Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advertising & IMC Principles & Practice

Authors: Sandra Moriarty, Nancy Mitchell, William Wells

9th Edition

9780132998208, 0132163640, 132998203, 978-0132163644

More Books

Students also viewed these Computer Network questions

Question

List and describe the four steps in the control process

Answered: 1 week ago

Question

Draw up a list of guidelines to use in designing a website.

Answered: 1 week ago

Question

Discuss some of the various ways media are classified.

Answered: 1 week ago

Question

What are the responsibilities of an art director?

Answered: 1 week ago