/* modifier datatype variable name*/ /* modifier datatype variable name*/ //turn on the tv turnOn() { public void on = true; } //turn off the tv /* returntype */ /* method name */() { public //set on to false /* */ } // returns true of tv is turned on /*modifier */ /* returntype */ isOn(){ //return value of on /* */ } // raises volume up such that it does not exceed 8 public void volumeLevelUp(int vol) { /* calculate new volume level */ if (/* value of new volume level less than 8 */){ /* set volumeLevel value to new volume level */ } } // lowers volume down such that it does not go below 0 /*modifier */ /* returntype */ /* method name */( /*parameters*/) { //method body similar to volumeLevelUp /* */ } } Part 5 Now add two more methods that take an integer as a parameter and modify channel using the value of that integer. and channelUp(int ch) should increment or decrement the channel by channelDown(int ch) number of channels. For example if is 5 and you called ch channel new value should be equal to 5 + 10 = 15. the channelUp(10) channel The channel must be between 0 and 100. public class TV { // data members // define instance variables channel, volumeLevel, on
/* modifier datatype variable name*/ /* modifier datatype variable name*/ //turn on the tv public void turnOn() { on = true; } //turn off the tv public /* returntype */ /* method name */() { //set on to false /* */ } // returns true of tv is turned on /*modifier */ /* returntype */ isOn(){ //return value of on /* */ } // raises volume up such that it does not exceed 8 public void volumeLevelUp(int vol) { /* calculate new volume level */ if (/* value of new volume level less than 8 */){ /* set volumeLevel value to new volume level */ } } // lowers volume down such that it does not go below 0 /*modifier */ /* returntype */ /* method name */( /*parameters*/) { //method body similar to volumeLevelUp /* */ } } Part 5 Now add two more methods that take an integer as a parameter and modify channel using the value of that integer. channelUp(int ch) and channelDown(int ch) should increment or decrement the channel by ch number of channels. For example if channel is 5 and you called channelUp(10) the new channel value should be equal to 5 + 10 = 15. The channel must be between 0 and 100. public class TV { // data members // define instance variables channel, volumeLevel, on