Example #1
0
def main():
    tv1=TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2=TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumnUp()

    print("tv1's channel is",tv1.getChannel(),"and volume level is",tv1.getVolumeLevel())
    print("tv2's channel is", tv2.getChannel(), "and volume level is", tv2.getVolumeLevel())
Example #2
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)
    
    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()
    
    print("tv1's channel is", tv1.getChannel(), 
        "and volume level is", tv1.getVolumeLevel())
    print("tv2's channel is", tv2.getChannel(),
        "and volume level is", tv2.getVolumeLevel())
Example #3
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print("tv1's channel is {} and volume level is {}.".format(
        tv1.getChannel(), tv1.getVolumeLevel()))
    print("tv2's channel is {} and volume level is {}.".format(
        tv2.getChannel(), tv2.getVolumeLevel()))
Example #4
0
def main():
	# tv1 is going to be a new TV object
	tv1 = TV()
	# gonna call all these methods on our new tv1 object
	tv1.turnOn()
	tv1.setChannel(30)
	tv1.setVolume(3)

	tv2 = TV()
	tv2.turnOn()
	tv2.channelUp()
	tv2.channelUp()
	tv2.volumeUp()

	print("tv1's channel is", tv1.getChannel(), "and volume level is", tv1.getVolumeLevel())
	print("tv2's channel is", tv2.getChannel(), "and volume level is", tv2.getVolumeLevel())
Example #5
0
def main():
    tv1 = TV()
    tv1.turnOn()
    tv1.setChannel(30)
    tv1.setVolume(3)

    tv2 = TV()
    tv2.turnOn()
    tv2.channelUp()
    tv2.channelUp()
    tv2.volumeUp()

    print("tv1의 채널은", tv1.getChannel(),
        "이고 음량 크기는", tv1.getVolumeLevel(), "입니다.")
    print("tv2의 채널은", tv2.getChannel(),
        "이고 음량 크기는", tv2.getVolumeLevel(), "입니다.")