Question: Need copyable PHYTON CODE Suppose there is a class AirConditioner. The class supports the following behaviors: turning the air conditioner on, off, setting the desired
Need copyable PHYTON CODE
Suppose there is a class AirConditioner. The class supports the following behaviors: turning the air conditioner on, off, setting the desired temperature, and telling the previously set temperature. The following methods are provided for these behaviors: turn_on and turn_off, which accept no arguments and return no value, set_temp, which accepts an int argument and returns no value, and get_temp, which accepts no value and returns an int. There is a reference variable my_ac to an object of this class, which has already been created. There is also a variable called current_temp, which has already been initialized. Invoke a method using the reference variable which returns the previously set temperature of the air conditioner, and store the returned value in current_temp.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
