Create a Java Project (with a class and a test class) to represent some real-world entity such as a technology item (TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already seen example classes such as Circle, Student, Rectangle, TV etc. The class will: a) Create a total of 5 member variables for the class by selecting the appropriate data types for each field. For example, a class to represent a lamp might include color, price, height, numBulbs, batteryOperated. Each of these 5 variables needs a data type. b) Includeatleastthreedifferentconstructormethods,includingthedefaultconstructor (no argument constructor), so totally three constructors. c) Create a member function showValues( ) to display the values of an object in a formatted manner. The Java test class (with a main method) will: a) Instantiate at least three objects (using each of the constructors at least once) with your program. b) Store the data from the individual objects into an array. c) Utilize the showValues() method to display the content of an object created. Note: 1) DrawtheUMLdiagramfortheclassandthenimplementtheclass.Drawobjectdiagrams wherever possible to show the state of the objects created 2) Generate output samples demonstrating all of your member functions showing their functionality (i.e. inputting values, outputting values (displaying them), performing calculations, etc.). Include the below in your project report: 1. The UML diagram of the class. 2. The class and test class 3. Screenshots of output generated from the application. ITDR2104 - Programming Fall 2020 ____________________________________________________________________________

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter11: Introduction To Classes
Section11.2: Basic Class Functions
Problem 9E
icon
Related questions
Question
Create a Java Project (with a class and a test class) to represent some real-world entity such as a technology item (TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already seen example classes such as Circle, Student, Rectangle, TV etc. The class will: a) Create a total of 5 member variables for the class by selecting the appropriate data types for each field. For example, a class to represent a lamp might include color, price, height, numBulbs, batteryOperated. Each of these 5 variables needs a data type. b) Includeatleastthreedifferentconstructormethods,includingthedefaultconstructor (no argument constructor), so totally three constructors. c) Create a member function showValues( ) to display the values of an object in a formatted manner. The Java test class (with a main method) will: a) Instantiate at least three objects (using each of the constructors at least once) with your program. b) Store the data from the individual objects into an array. c) Utilize the showValues() method to display the content of an object created. Note: 1) DrawtheUMLdiagramfortheclassandthenimplementtheclass.Drawobjectdiagrams wherever possible to show the state of the objects created 2) Generate output samples demonstrating all of your member functions showing their functionality (i.e. inputting values, outputting values (displaying them), performing calculations, etc.). Include the below in your project report: 1. The UML diagram of the class. 2. The class and test class 3. Screenshots of output generated from the application. ITDR2104 - Programming Fall 2020 ____________________________________________________________________________ Part-2 (5 marks) ____________________________________________________________________________ Consider the Class that you designed in Part-1 of this project and do the following: 1. Implement the Comparable and Cloneable interface for your class. 2. The Test class should create 10 instances (objects) of your class. 3. Store these instances in Array and ArrayList. 4. Show the demo of sorting these objects stored in Array and ArrayList. Include the below in your project report:  The code of implementing Comparable and Cloneable Interfaces.  Screenshot of relevant (Comparable and Cloneable) outputs.
Part-1 (5 marks)
Create a Java Project (with a class and a test class) to represent some real-world entity such as a
technology item (TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already
seen example classes such as Circle, Student, Rectangle, TV etc.
The class will:
a) Create a total of 5 member variables for the class by selecting the appropriate data types
for each field. For example, a class to represent a lamp might include color, price, height,
numBulbs, batteryOperated. Each of these 5 variables needs a data type.
b) Include at least three different constructor methods, including the default constructor
(no argument constructor), so totally three constructors.
c) Create a member function showValues( ) to display the values of an object in a formatted
manner.
The Java test class (with a main method) will:
a) Instantiate at least three objects (using each of the constructors at least once) with your
program.
b) Store the data from the individual objects into an array.
c) Utilize the showValues() method to display the content of an object created.
Note:
1) Draw the UML diagram for the class and then implement the class. Draw object diagrams
wherever possible to show the state of the objects created
2) Generate output samples demonstrating all of your member functions showing their
functionality (i.e. inputting values, outputting values (displaying them), performing
calculations, etc.).
Include the below in your project report:
1. The UML diagram of the class.
2. The class and test class
3. Screenshots of output generated from the application.
ITDR2104 - Programming
Fall 2020
Part-2 (5 marks)
Consider the Class that you designed in Part-1 of this project and do the following:
1. Implement the Comparable and Cloneable interface for your class.
2. The Test class should create 10 instances (objects) of your class.
3. Store these instances in Array and ArrayList.
4. Show the demo of sorting these objects stored in Array and ArrayList.
Include the below in your project report:
The code of implementing Comparable and Cloneable Interfaces.
Screenshot of relevant (Comparable and Cloneable) outputs.
Transcribed Image Text:Part-1 (5 marks) Create a Java Project (with a class and a test class) to represent some real-world entity such as a technology item (TV, Fan etc), an animal, a person, a vehicle, etc. In our class, we have already seen example classes such as Circle, Student, Rectangle, TV etc. The class will: a) Create a total of 5 member variables for the class by selecting the appropriate data types for each field. For example, a class to represent a lamp might include color, price, height, numBulbs, batteryOperated. Each of these 5 variables needs a data type. b) Include at least three different constructor methods, including the default constructor (no argument constructor), so totally three constructors. c) Create a member function showValues( ) to display the values of an object in a formatted manner. The Java test class (with a main method) will: a) Instantiate at least three objects (using each of the constructors at least once) with your program. b) Store the data from the individual objects into an array. c) Utilize the showValues() method to display the content of an object created. Note: 1) Draw the UML diagram for the class and then implement the class. Draw object diagrams wherever possible to show the state of the objects created 2) Generate output samples demonstrating all of your member functions showing their functionality (i.e. inputting values, outputting values (displaying them), performing calculations, etc.). Include the below in your project report: 1. The UML diagram of the class. 2. The class and test class 3. Screenshots of output generated from the application. ITDR2104 - Programming Fall 2020 Part-2 (5 marks) Consider the Class that you designed in Part-1 of this project and do the following: 1. Implement the Comparable and Cloneable interface for your class. 2. The Test class should create 10 instances (objects) of your class. 3. Store these instances in Array and ArrayList. 4. Show the demo of sorting these objects stored in Array and ArrayList. Include the below in your project report: The code of implementing Comparable and Cloneable Interfaces. Screenshot of relevant (Comparable and Cloneable) outputs.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Software Development
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr