Assume there is a class AirConditioner that supports the following behaviors : turning the air conditioner on and off. The following methods provide these behaviors : turnOn and turnOff. Both methods accept no arguments and return no value.

Assume there is a class AirConditioner that supports the following behaviors : turning the air conditioner on and off. The following methods provide these behaviors : turnOn and turnOff. Both methods accept no arguments and return no value.

LANGUAGE: JAVA

CHALLENGE:
Assume there is a class AirConditioner that supports the following behaviors : turning the air conditioner on and off. The following methods provide these behaviors : turnOn and turnOff. Both methods accept no arguments and return no value.

Assume there is a reference variable officeAC of type AirConditioner. Create a new object of type AirConditioner and save the reference in officeAC. After that, turn the air conditioner on using the reference to the new object.

This content requires that you purchase additional access. The price is $2.99 or free for our Make Life Easier and 30 Days – Not Recurring members.

Purchase this Content ($2.99) Choose a Membership Level