Description
I want to write a simple paint program in Java.
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Hope that helps.
Completion Status:
100%
Review
Review
Anonymous
Awesome! Made my life easier.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
6 pages
Internationalization And Localization Section
Companies tend to avail products and services to people to improve their living standards. Companies operate locally, whil ...
Internationalization And Localization Section
Companies tend to avail products and services to people to improve their living standards. Companies operate locally, while others have their ...
5 pages
The Benefits And Costs Of Ethical And Unethical Behavior
The benefits and costs of ethical and unethical behavior Ethical behavior in a company strives to create moral integrity, ...
The Benefits And Costs Of Ethical And Unethical Behavior
The benefits and costs of ethical and unethical behavior Ethical behavior in a company strives to create moral integrity, fairness, and respect for
Java Question
⚡ PROBLEMS to be answeredHomework 1 Objects - Pick one of the following scenarios and model using at least 7 cla ...
Java Question
⚡ PROBLEMS to be answeredHomework 1 Objects - Pick one of the following scenarios and model using at least 7 classes: one parent, two children, two grandchildren of one of the child classes, and 2 other classes in a has-some or has-a relationship with some of the previous 5 classes. The parent-child relationship is an inheritance (is-a) relationship. Provide at least one typed instance variable and one method that compellingly differentiates each class from the others. Make sure to include the return type and the types of the arguments for any method being proposed. Do not include constructors, getters, setters, or any no argument methods in your description. Do not use the same example as previous posters. Scenarios - lots of them spring to mind, but I don't want the list to be too long. In this way, you can compare your ideas with those of other students, and I encourage to consider what other students have posted, you are also encouraged to make suggestions of other's postings and make additional postings updating your own ideas in light of the suggestions by others. An airplaneA trainAn e-commerce company (eg, Amazon)A city governmentAn airline (aspects of an entire company)A government organization (eg, EPA, Defense)NOTE: A general is not a kind of private, nor is a private a kind of general, for example.Also, a general is not a kind of Defense DepartmentTHUS: not all hierarchies are class hierarchies! Note: This problem is NOT asking for a full implementation of these classes - a UML diagram, or similar level of detail, is adequate. You will find many of the items in the following helpful: http://sandsduchon.org/duchon/Musings/a/index.html I would emphasize the following kinds of relationships among classes: is-a parent/child relationship in a class hierarchy perhaps better to use the phrase "is a kind of", as in "a Private is a kind of Soldier" or "a SportsCar is a kind of Car" is-some a data structure in which all the elements have the same type. This is the place where one should use generic classes. has-a an attribute (field) of one class inside another has-some a 1-to-n relationship, a Vehicle will have one or more Occupant instance ⚡ PROBLEMS to be answered For problems 1 through 4, explain why the code as shown is almost certainly not what the programmer intended, and how it should be fixed to work the way the programmer probably had in mind. 1. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassA { 2 int v = 12; 3 4 public MyClassA (int pV) { 5 v = pV; 6 } 7 8 public static void main (String args []) { 9 MyClassA m = new MyClassA (); 10 } // end main 11 } // end class MyClassA 2. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassB { 2 int v = 12; 3 4 public void MyClassB (int pV) { 5 v = pV; 6 } 7 8 public static void main (String args []) { 9 MyClassB m = new MyClassB (23); 10 } // end main 11 } // end class MyClassB 3. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassD { 2 public static void main (String args []) { 3 MyClassC m = new MyClassC (23); 4 } // end main 5 } // end class MyClassD 6 7 class MyClassC { 8 int v = 12; 9 10 public MyClassC (int pV) { 11 int v = pV; 12 } 13 14 } // end class MyClassC 4. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassE { 2 public static void main (String args []) { 3 MyClassF m = new MyClassF (23); 4 } // end main 5 } // end class MyClassE 6 7 class MyClassF { 8 int v = 12; 9 10 private MyClassF (int pV) { 11 v = pV; 12 } 13 14 } // end class MyClassF 5. (10 pts) Given all the problems identified in problems 1 through 4, explain in detail why the following code works, ie, compiles without errors or warnings. 1 public class MyClassG { 2 public static void main (String args []) { 3 MyClassH m = new MyClassH (23, true); 4 } // end main 5 } // end class MyClassG 6 7 class MyClassH { 8 int v = 12; 9 10 public MyClassH (int x, boolean b) { 11 this (x); 12 } 13 14 private MyClassH (int pV) { 15 v = pV; 16 } 17 18 } // end class MyClassH 6. (10 pts) Explain why the following class hierarchy is not reasonable: DefenseDepartment General Private 7. (10 pts) Give at least one example of a reasonable field for each of the following classes in the following class hierarchy. Be sure that the field is at the right level in the hierarchy. Vehicle Car Airplane Passenger Fighter Bomber SpaceShip 8. (10 pts) Give at least one example of a reasonable method for each of the following classes in the following class hierarchy. Be sure that the method is at the right level in the hierarchy. Constructors, getters and setters don't count for this problem. Vehicle Car Airplane Passenger Fighter Bomber SpaceShip 9. (10 pts) Are a Private and a Platoon in an encapsulation or an inheritance relationship? Explain 10. (10 pts) Present reasonable parent and child classes for the class Tree (the biological kind). Give a short explanation for why the classes you are proposing are in good parent-child relationships. Grading Rubric: Attribute Meets Does not meet Problem 1 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 2 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 3 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 4 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 5 10 points Given all the problems identified in problems 1 through 4, explains in detail why the code works, ie, compiles without errors or warnings. 0 points Given all the problems identified in problems 1 through 4, does not explain in detail why the code works, ie, compiles without errors or warnings. Problem 6 10 points Explains why the class hierarchy is not reasonable. 0 points Does not explain why the class hierarchy is not reasonable. Problem 7 10 points Gives at least one example of a reasonable field for each of the classes. The field is at the right level in the hierarchy. 0 points Does not give at least one example of a reasonable field for each of the classes. The field is not at the right level in the hierarchy. Problem 8 10 points Gives at least one example of a reasonable method for each of the classes. The method is at the right level in the hierarchy. Does not include constructors, getters and setters. 0 points Does not give at least one example of a reasonable method for each of the classes. The method is not at the right level in the hierarchy. Includes constructors, getters and setters. Problem 9 10 points Explains inheritance and encapsulation correctly and in sufficient detail given the example provided. 0 points Does not explain inheritance and encapsulation correctly and in sufficient detail given the example provided. Problem 10 10 points Presents reasonable parent and child classes for the class Tree. Gives a short explanation for why the classes you are proposing are in good parent-child relationships. 0 points Does not present reasonable parent and child classes for the class Tree. Does not give a short explanation for why the classes you are proposing are in good parent-child relationships.
IT 214 NOVA Car Rental Service MySQL Project
. You must use MySQL to implement the database you designed in Part I. Test the queries you used to create and populate th ...
IT 214 NOVA Car Rental Service MySQL Project
. You must use MySQL to implement the database you designed in Part I. Test the queries you used to create and populate the database in MySQL. After successful completion of an SQL query:Type your name at the following mysql> prompt.Take a screen shot (Alt + Print Screen) that includes the query, the confirmation message, the results (if any), and your name.Paste the screen shot in the appropriate location in your MS Word file.IMPORTANT NOTICE: If some of the tables in your database have the same names as the tables in the databases used in class (Premiere Products, Henry Books, and Alexamara Marina Group), re-name your tables. For instance, if the name of your table is CUSTOMER, change it to CUSTOMER_1. Do not delete existing tables from the databases used in class otherwise you will not be able to complete the rest of the homeworks.Part II must include:1.The title page with the course number, section number, and your name.2.The ERD of the database you designed in Part 1. If you have to make changes in the structure of the database, you must receive your professor’s approval before you implement them.3.Screen shots of the queries used to create tables and populate them with data. For each table, include the following:a.A screen shot(s) of the SQL query you used to create the table with appropriate attributes and data types together with primary keys, foreign keys, relationships and constraints.b.A screen shot(s) of the DESCRIBE table_name; command to show the structure of the table.c.A screen shot(s) of all SQL queries you used to populate the table with valid data. Each table must contain a minimum of 3 records.d.A screen shot(s) of the SELECT * command to show the resulting table with all the valid data inserted.Paste all screen shots from parts a-d for each table together in one place.4.Screen shots of SQL queries you used to retrieve data from the tables along with the query results. For each query, explain in a complete, coherent sentence what it is intended to do, what data is expected as a result and how they are different from previous queries. Clearly identify each screen shot you paste into this section. To create queries, use the following structures: A query that is based on two tables and includes both an arithmetic and a special operator in the conditional expression.A query that is based on more than two tables and includes both an arithmetic and a special operator in the conditional expression. Both the arithmetic and the special operator must be different from the ones used in part a.A query that includes a sub-query.A query that contains the GROUP BY clause, one of the aggregate functions, the WHERE statement, and the HAVING operator.Two additional complex queries designed by you that are different from the above. A complex query is based on two or more tables and includes either several conditions or a subquery (or both).
6 pages
10 Tough Queries
Q1. List all courses that have "Intro to Information Systems" as Q2. List all courses with above average cost. Display co ...
10 Tough Queries
Q1. List all courses that have "Intro to Information Systems" as Q2. List all courses with above average cost. Display course description,
MIS3101 SU Web-based Applications in Companies Essay
As technology grows, so does its uses. Companies are finding ways to let their employees manage various parts of their job ...
MIS3101 SU Web-based Applications in Companies Essay
As technology grows, so does its uses. Companies are finding ways to let their employees manage various parts of their job without needing a full-time employee. One way this is done is with web-based self-service applications.
Discuss new ways for employees to use Web-based self-service applications in their companies that will help save time and money. Describe not only the applications and how they work, but how they can save the company money and time. Be sure to include disadvantages to the process from the point of view of the employee.
Similar Content
Business Case Project
For
this project I want you to make believe you are an entrepreneur running
your own company. It can be any kind of c...
Grossmont College Java Lab 8 & 9 Intermediate Level Java Programming Lab Reports
Lab 8
NOTE: For this lab, you will get 5 points for a valid attempt if turned in by the due date.
The main new functionali...
COP 3084 Miami Dade College Week 1 Intermediate Java Programming Bingo Program
BINGO– A Visualization
int[][] BingoCardArray = new int[5][5];
Use a nested for-loop, to populate the 2-D array represen...
Proposed Research vmware
Cloud computing - vmware.docx ...
San Francisco State Conversions between Celsius and Fahrenheit Java File
Please teach me how to write this assignment please and with comment, and can you explain a little bit more for method jav...
File Concordance Unique Words & Frequencies Simple Python Programming Exercise
A file concordance tracks the unique words in a file and their frequencies. Write a program that displays a concordance fo...
Solutionstats
The first step in any analysis is data exploration. In this case, we perform some samary statistics on the dataset. Lets f...
Discussion Question It405 E Portal Development
Server-side scripting runs on web servers. They are applied to build pages that are dynamic. It can also handle the web se...
Dm
How Data Mining can help a business to generate revenue Identify and Segment the customers: Without customers company can'...
Related Tags
Book Guides
Anthem
by Ayn Rand
The Call of the Wild
by Jack London
The Calcutta Chromosome
by Amitav Ghosh
To the Lighthouse
by Virginia Woolf
Catching Fire
by Suzanne Collins
The Chosen
by Chaim Potok
The Color Purple
by Alice Walker
Shattered - Inside Hillary Clintons Doomed Campaign
by Amie Parnes and Jonathan Allen
Fences
by August Wilson
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
6 pages
Internationalization And Localization Section
Companies tend to avail products and services to people to improve their living standards. Companies operate locally, whil ...
Internationalization And Localization Section
Companies tend to avail products and services to people to improve their living standards. Companies operate locally, while others have their ...
5 pages
The Benefits And Costs Of Ethical And Unethical Behavior
The benefits and costs of ethical and unethical behavior Ethical behavior in a company strives to create moral integrity, ...
The Benefits And Costs Of Ethical And Unethical Behavior
The benefits and costs of ethical and unethical behavior Ethical behavior in a company strives to create moral integrity, fairness, and respect for
Java Question
⚡ PROBLEMS to be answeredHomework 1 Objects - Pick one of the following scenarios and model using at least 7 cla ...
Java Question
⚡ PROBLEMS to be answeredHomework 1 Objects - Pick one of the following scenarios and model using at least 7 classes: one parent, two children, two grandchildren of one of the child classes, and 2 other classes in a has-some or has-a relationship with some of the previous 5 classes. The parent-child relationship is an inheritance (is-a) relationship. Provide at least one typed instance variable and one method that compellingly differentiates each class from the others. Make sure to include the return type and the types of the arguments for any method being proposed. Do not include constructors, getters, setters, or any no argument methods in your description. Do not use the same example as previous posters. Scenarios - lots of them spring to mind, but I don't want the list to be too long. In this way, you can compare your ideas with those of other students, and I encourage to consider what other students have posted, you are also encouraged to make suggestions of other's postings and make additional postings updating your own ideas in light of the suggestions by others. An airplaneA trainAn e-commerce company (eg, Amazon)A city governmentAn airline (aspects of an entire company)A government organization (eg, EPA, Defense)NOTE: A general is not a kind of private, nor is a private a kind of general, for example.Also, a general is not a kind of Defense DepartmentTHUS: not all hierarchies are class hierarchies! Note: This problem is NOT asking for a full implementation of these classes - a UML diagram, or similar level of detail, is adequate. You will find many of the items in the following helpful: http://sandsduchon.org/duchon/Musings/a/index.html I would emphasize the following kinds of relationships among classes: is-a parent/child relationship in a class hierarchy perhaps better to use the phrase "is a kind of", as in "a Private is a kind of Soldier" or "a SportsCar is a kind of Car" is-some a data structure in which all the elements have the same type. This is the place where one should use generic classes. has-a an attribute (field) of one class inside another has-some a 1-to-n relationship, a Vehicle will have one or more Occupant instance ⚡ PROBLEMS to be answered For problems 1 through 4, explain why the code as shown is almost certainly not what the programmer intended, and how it should be fixed to work the way the programmer probably had in mind. 1. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassA { 2 int v = 12; 3 4 public MyClassA (int pV) { 5 v = pV; 6 } 7 8 public static void main (String args []) { 9 MyClassA m = new MyClassA (); 10 } // end main 11 } // end class MyClassA 2. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassB { 2 int v = 12; 3 4 public void MyClassB (int pV) { 5 v = pV; 6 } 7 8 public static void main (String args []) { 9 MyClassB m = new MyClassB (23); 10 } // end main 11 } // end class MyClassB 3. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassD { 2 public static void main (String args []) { 3 MyClassC m = new MyClassC (23); 4 } // end main 5 } // end class MyClassD 6 7 class MyClassC { 8 int v = 12; 9 10 public MyClassC (int pV) { 11 int v = pV; 12 } 13 14 } // end class MyClassC 4. (10 pts) What is wrong with the following program and how should it be fixed? 1 public class MyClassE { 2 public static void main (String args []) { 3 MyClassF m = new MyClassF (23); 4 } // end main 5 } // end class MyClassE 6 7 class MyClassF { 8 int v = 12; 9 10 private MyClassF (int pV) { 11 v = pV; 12 } 13 14 } // end class MyClassF 5. (10 pts) Given all the problems identified in problems 1 through 4, explain in detail why the following code works, ie, compiles without errors or warnings. 1 public class MyClassG { 2 public static void main (String args []) { 3 MyClassH m = new MyClassH (23, true); 4 } // end main 5 } // end class MyClassG 6 7 class MyClassH { 8 int v = 12; 9 10 public MyClassH (int x, boolean b) { 11 this (x); 12 } 13 14 private MyClassH (int pV) { 15 v = pV; 16 } 17 18 } // end class MyClassH 6. (10 pts) Explain why the following class hierarchy is not reasonable: DefenseDepartment General Private 7. (10 pts) Give at least one example of a reasonable field for each of the following classes in the following class hierarchy. Be sure that the field is at the right level in the hierarchy. Vehicle Car Airplane Passenger Fighter Bomber SpaceShip 8. (10 pts) Give at least one example of a reasonable method for each of the following classes in the following class hierarchy. Be sure that the method is at the right level in the hierarchy. Constructors, getters and setters don't count for this problem. Vehicle Car Airplane Passenger Fighter Bomber SpaceShip 9. (10 pts) Are a Private and a Platoon in an encapsulation or an inheritance relationship? Explain 10. (10 pts) Present reasonable parent and child classes for the class Tree (the biological kind). Give a short explanation for why the classes you are proposing are in good parent-child relationships. Grading Rubric: Attribute Meets Does not meet Problem 1 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 2 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 3 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 4 10 points Explains why the code as shown is almost certainly not what the programmer intended. Explains how it should be fixed to work the way the programmer probably had in mind. 0 points Does not explain why the code as shown is almost certainly not what the programmer intended. Does not explain how it should be fixed to work the way the programmer probably had in mind. Problem 5 10 points Given all the problems identified in problems 1 through 4, explains in detail why the code works, ie, compiles without errors or warnings. 0 points Given all the problems identified in problems 1 through 4, does not explain in detail why the code works, ie, compiles without errors or warnings. Problem 6 10 points Explains why the class hierarchy is not reasonable. 0 points Does not explain why the class hierarchy is not reasonable. Problem 7 10 points Gives at least one example of a reasonable field for each of the classes. The field is at the right level in the hierarchy. 0 points Does not give at least one example of a reasonable field for each of the classes. The field is not at the right level in the hierarchy. Problem 8 10 points Gives at least one example of a reasonable method for each of the classes. The method is at the right level in the hierarchy. Does not include constructors, getters and setters. 0 points Does not give at least one example of a reasonable method for each of the classes. The method is not at the right level in the hierarchy. Includes constructors, getters and setters. Problem 9 10 points Explains inheritance and encapsulation correctly and in sufficient detail given the example provided. 0 points Does not explain inheritance and encapsulation correctly and in sufficient detail given the example provided. Problem 10 10 points Presents reasonable parent and child classes for the class Tree. Gives a short explanation for why the classes you are proposing are in good parent-child relationships. 0 points Does not present reasonable parent and child classes for the class Tree. Does not give a short explanation for why the classes you are proposing are in good parent-child relationships.
IT 214 NOVA Car Rental Service MySQL Project
. You must use MySQL to implement the database you designed in Part I. Test the queries you used to create and populate th ...
IT 214 NOVA Car Rental Service MySQL Project
. You must use MySQL to implement the database you designed in Part I. Test the queries you used to create and populate the database in MySQL. After successful completion of an SQL query:Type your name at the following mysql> prompt.Take a screen shot (Alt + Print Screen) that includes the query, the confirmation message, the results (if any), and your name.Paste the screen shot in the appropriate location in your MS Word file.IMPORTANT NOTICE: If some of the tables in your database have the same names as the tables in the databases used in class (Premiere Products, Henry Books, and Alexamara Marina Group), re-name your tables. For instance, if the name of your table is CUSTOMER, change it to CUSTOMER_1. Do not delete existing tables from the databases used in class otherwise you will not be able to complete the rest of the homeworks.Part II must include:1.The title page with the course number, section number, and your name.2.The ERD of the database you designed in Part 1. If you have to make changes in the structure of the database, you must receive your professor’s approval before you implement them.3.Screen shots of the queries used to create tables and populate them with data. For each table, include the following:a.A screen shot(s) of the SQL query you used to create the table with appropriate attributes and data types together with primary keys, foreign keys, relationships and constraints.b.A screen shot(s) of the DESCRIBE table_name; command to show the structure of the table.c.A screen shot(s) of all SQL queries you used to populate the table with valid data. Each table must contain a minimum of 3 records.d.A screen shot(s) of the SELECT * command to show the resulting table with all the valid data inserted.Paste all screen shots from parts a-d for each table together in one place.4.Screen shots of SQL queries you used to retrieve data from the tables along with the query results. For each query, explain in a complete, coherent sentence what it is intended to do, what data is expected as a result and how they are different from previous queries. Clearly identify each screen shot you paste into this section. To create queries, use the following structures: A query that is based on two tables and includes both an arithmetic and a special operator in the conditional expression.A query that is based on more than two tables and includes both an arithmetic and a special operator in the conditional expression. Both the arithmetic and the special operator must be different from the ones used in part a.A query that includes a sub-query.A query that contains the GROUP BY clause, one of the aggregate functions, the WHERE statement, and the HAVING operator.Two additional complex queries designed by you that are different from the above. A complex query is based on two or more tables and includes either several conditions or a subquery (or both).
6 pages
10 Tough Queries
Q1. List all courses that have "Intro to Information Systems" as Q2. List all courses with above average cost. Display co ...
10 Tough Queries
Q1. List all courses that have "Intro to Information Systems" as Q2. List all courses with above average cost. Display course description,
MIS3101 SU Web-based Applications in Companies Essay
As technology grows, so does its uses. Companies are finding ways to let their employees manage various parts of their job ...
MIS3101 SU Web-based Applications in Companies Essay
As technology grows, so does its uses. Companies are finding ways to let their employees manage various parts of their job without needing a full-time employee. One way this is done is with web-based self-service applications.
Discuss new ways for employees to use Web-based self-service applications in their companies that will help save time and money. Describe not only the applications and how they work, but how they can save the company money and time. Be sure to include disadvantages to the process from the point of view of the employee.
Earn money selling
your Study Documents