Write a java program (class) named “TelevisionDemo”, that will use a class, “Television” that will allow a user to perform the following actions that will be performed by the second class: Turn on the...




  1. Write a java program (class) named “TelevisionDemo”, that will use a class, “Television” that will allow a user to perform the following actions that will be performed by the second class:

    1. Turn on the TV.

    2. Turn off the TV.

    3. Increase the volume.

    4. Decrease the volume

    5. Find out the volume

    6. Find out the channel that is currently being used. (e.g. “int channel =4”, a value specified in the “Television” class)




 Use either scanner of JOPtionPane to ask the user what he wants to do. Use “if – else – if” statements to execute the method associated with user’s input of a number representing the desired action (e.g. 1=Turn on/Turn off TV, 2 = Increase volume, 3 = decrease volume, 4=find out channel). Use the choice to get value using the new Television object.



Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here