RSS Forums RSS
Please support our Java advertiser: Lunarpages Java Web Hosting

Help w/ constructors

Join Date: Aug 2004
Location: Los Angeles
Posts: 345
Reputation: Ghost is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Help Help w/ constructors

  #1  
Oct 9th, 2004
I need urgent help with the following problem:

Suppose  there is a class  AirConditioner . The class  supports the following behaviors : turning the air conditioner on and off. The following methods  are provided for these behaviors : turnOn and turnOff . Both methods  accept no arguments  and return no value .
There is a reference variable  myAC to an object  of this class , which has already  been created. Send a message  to this object  using the reference variable , telling it to turn the air conditioner on.

I think the answer is:

sendMessage(turnOn);

but i'm worng.

PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!
CRD
Join the CRD forums! If you're one of the first 4 people to post in a topic, you get FREE web hosting with:
Apache WWW Host
Unlimited (within reason) storage
Unlimited (within reason) bandwith
PHP
mySQL
FTP
Unlimited Subdomains Hosted
Unlimited Domains Hosted

ALL FREE!!

Click here to visit
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 11:38 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC