Suppose there is a class AirConditioner. The class supports thefollowing behaviors: turning the air conditioner on and off. Thefollowing methodsare provided for these behaviors:turn_on and turn_off. Both methods accept noarguments and return no value.
There is a reference variable my_ac to anobject of this class, which has already beencreated. Invoke a method to turn the air conditioneroff.
Instructor Notes:
You are ONLY writing one statement for this question.
Answer
To call function turn_off with referencevariable my_ac the code is as below.
my_ac.turn_off ();