Question: Write a code using python with a comment and explanation and show its output for the following problem. Modify and add any info that missing

Write a code using python with a comment and explanation and show its output for the following problem. Modify and add any info that missing in the UML consider TV sets. 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 can use a class to model TV sets. The UML diagram for the class is as shown Tv channel: int volumeLevel: int on: boolean Int() turnOn(): None turnOff(): None getchannel () setChannel (newChannel: int): none getVolumeLevel() setVolume(newVolumeLevel: int): None channelUp(: None channelDown(): None volumeUp(: None volumeDown(): None Construct a default TV that sets channel to 1,volume level to 1 and on to false turns on the tv turns off the tv returns that channel of the TV sets a new channel of the TV gets the volume level for the TV Increase the Channel number by 1 decrease the Channel number by 1 Increase the volume level by 1 decrease the volume level by 1 returns a string represents the TV instance such that if the TV is off it returns a string represents the TV instance such that if the TV is off it returns the TV is OFF, If the TV is on it returns (the TV is ON a channel +channel and the volume level is +volumeLevel) str-():String
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
