This site requires JavaScript, please enable it in your browser!
Greenfoot back
2woodsway
2woodsway wrote ...

2011/11/14

SOS- My professor is in Germany and cannot help

2woodsway 2woodsway

2011/11/14

#
I am new to this class and completely lost. I am supposed to: Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off, and checking if the air conditioner is on or off. The following methods provide this behavior: turnOn and turnOff , setTemp , and isOn , which accepts no argument and returns a boolean indicating whether the air conditioner is on or off. Assume there is a reference variable myAC to an object of this class, which has already been created. There is also a boolean variable status , which has already been declared. Use the reference variable, to invoke a method to find out whether the air conditioner is on and store the result in status .
keiko1dog keiko1dog

2011/11/14

#
This is similar to the other one, read from right to left, is myAC on? return true or false to status. status = myAC.isOn(); I think we're in the same class!!
2woodsway 2woodsway

2011/11/14

#
Walden?
keiko1dog keiko1dog

2011/11/14

#
yep, professor Bendick?
2woodsway 2woodsway

2011/11/14

#
LOL!!!!Hallo!!!! Can you tutor me? Please????Can you help me with one more question? Assume there is a class AirConditioner that supports the following behaviors: turning the air conditioner on and off. The following methods are provide this behavior: turnOn and turnOff . Both methods take no arguments and return no value. Assume there is a reference variable myAC to an object of this class, which has already been created. Using the reference variable, invoke a method to tell the air conditioner object to turn on. So, as a result of your code executing, the turnOn() method of the AirCondition object that myAC refers to will be invoked.
2woodsway 2woodsway

2011/11/14

#
I am trying to understand where I went wrong
2woodsway 2woodsway

2011/11/14

#
I think I got it..thanks so much!!, please respond if you are interested in tutoring.
keiko1dog keiko1dog

2011/11/15

#
I'll help where I can! I'm still working on app2!!! LOL
Cadebayo Cadebayo

2011/11/15

#
pretty sure the answer is: myAC.turnOn() ;
You need to login to post a reply.