Answer :
Answer:
1)
officeAC = new AirConditioner();
officeAC.turnOn();
2)
officeAC = new AirConditioner();
officeAC.turnOn();
officeAC.setTemp(69);
Explanation:
1)
In the first statement a new object of the class AirConditioner whose reference is assigned to the officeAC. new is a keyword which creates an object of the class.
Next statement uses the method turnOn(). Reference to the new object officeAC is used to invoke this method turnOn().
2) The first two statements works the same as in 1)
The last statement invokes a method setTemp() using the reference variable and passes the value 69 to this method to set the desired temperature.