• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Class Problem  RSS feed

 
Shaylen Patel
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, I need some help with my code.

Here is the question:
-In your main, you should create a thermostat and thoroughly test it. Be sure to showcase time passing and the temperature reaching the desired setting. Also, showcase switching modes from heating to cooling.

My question is, once it reaches the desired temp, would the thermostat turn off, and then how do you show switching from heating and cooling.
Thanks for the help.

This is what prints.
Thermostat is: true Thermostat is: false The desired temp: 70.0 The current temp: 69.0
Tue Feb 25 19:06:21 CST 2014
Tue Feb 25 20:06:21 CST 2014
Thermostat is: true Thermostat is: false The desired temp: 70.0 The current temp: 70.0



Here is my Class:

 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing I would be more clear in your output is to somehow differentiate between "Thermostat is: true Thermostat is: false". They seem contradictory although your code points to two different booleans.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!