Question: Consider a television set. Each TV is an object with fields (variables), such as, channel, volume level, power, size, and type. It has also some

Consider a television set. Each TV is an object with fields (variables), such as, channel, volume level, power, size, and type. It has also some functionalities, such as, set channels (1-120), change channels (up/down), set volume (1-50), change volume (up/down), turn on/off, and set mode (mute/unmute) etc.,. As such, you can use a class to model (describe) a TV set.

Things to do in this assignment:

1. Draw a UML diagram for the TV class. The UML diagram must include all the necessary fields and methods.

2. Declare and define the TV class. In the class,

A. Declare all the necessary fields.

B. Declare and define the constructor methods (at least two) to initialize the fields.

C. Declare and define all the necessary Accessor methods to read the fields.

D. Declare and define all the Mutator methods to set all the fields.

3. Create a Tester class to create a TV object out of the TV class defined as above. In the Tester class,

A. You must add necessary methods so that user can input their data to work with the TV, such as, making the TV On/Off, setting a channel, set a specific volume etc., your program should also display the current settings of the TV.

B. The Tester class must have multiple methods.


Step by Step Solution

3.46 Rating (146 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To complete the assignment lets address the specific tasks one by one starting with the UML diagram ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Network Questions!