Question: This is basic java! - [TV] Each TV is an object with states (current channel, current volume level, power on or off) and behaviors (change
This is basic java!
![This is basic java! - [TV] Each TV is an object with](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f50c1974488_44866f50c18ede87.jpg)



- [TV] Each TV is an object with states (current channel, current volume level, power on or off) and behaviors (change channels, adjust volume, turn on/off) You should implement the exact test code TV volume must be between 1 and 7 TV must have only 30 channels (1 to 30). Sample Output Samsung's channel is 30 and volume is 3 LG's channel is 2 and volume is 2 Samsung's model number is AAA LG's model number is BBB Test Code public static void main(String[] args) { TV tv1 = new TV("Samsung", "AAA"); tv1. turnon(); tv1.setChannel(30); tv1.setVolume (3); TV tv2 = new TV("LG","BBB"); tv2.channelUp(); tv2. turnon(); tv2.channelUp(); tv2.volumeUp(); tv2.turnOff(); tv2.volumeDown(); System.out.println(tv1.getTVBrand() + "'s channel is + tvi.channel + " and volume is " +tv1. volumeLevel); System.out.println(tv2.getTVBrand() + "'s channel is " + tv2.channel + " and volume is " + tv2.volumeLevel); System.out.println(tv1.getTVBrand() + "'s model number is " + tv1.getModelNumber()); System.out.println(tv2.getTVBrand() + "'s model number is " + tv2.getModelNumber()); } Your program should meet all the requirements and print the same result as output
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
