|
-
October 6th, 2011, 01:40 PM
#1
turn on the airconditioner
I just can't figure out this problem and the assignment is due tonight!
Here is the prompt.
Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and setting the desired temperature. The following methods provide these behaviors: turnOn and turnOff , which accept no arguments and return no value, and setTemp , which accepts an int argument and returns 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, use the reference to turn on the new air conditioner object and set the desired temperature to 69 degrees.
Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|