Question: please us in JAVA For this assignment you will implement one class, called TV, that models some aspects of the behavior of simple television. A

please us in JAVAplease us in JAVA For this assignment you will implement one class,

For this assignment you will implement one class, called TV, that models some aspects of the behavior of simple television. A TV has a current channel and volume. The volume level ranges from 0.0 to 1.0. The possible range of channels is determined by two parameters that we will refer to as start and numChannels. In general there will always be numChannels consecutive channels, the lowest of which is start; that is, the range of values is from start up to start + numChannels 1, inclusive. The volume is adjusted with methods volumeUp and volumeDown, but never goes above 1.0 or below 0.0. The volume is incremented or decremented by the value of the constant VOLUME_INCREMENT. The channel is adjusted with methods channelUp and channelDown, but never goes below start or above start + numChannels - 1. The channel can also be set directly with the setChannel method. The method gotoPreviousChannel sets the channel to the most recent previous channel number. It is also possible to "reprogram" the TV to set a different start channel or number of channels. Please note that you do not need any conditional statements (i.e. "if" statements) or anything else we haven't covered, for this assignment. There will be a couple of places where you need to choose the larger or smaller of two numbers, which can be done with the methods Math.min() or Math.min(). For the wrapping behavior of the channel numbers, you can use the mod (%) operator. (You will not be directly penalized for using conditional statements, but your code will become longer and more complicated, and if it becomes overly complicated and hard to read, the TA will start taking off points.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!