Advertisement
nawamkihafahd

Untitled

Sep 28th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. public class Heater
  2. {
  3. // instance variables - replace the example below with your own
  4. private double temperature;
  5. public Heater()
  6. {
  7. // initialise instance variables
  8. temperature = 15;
  9. }
  10. public void warmer()
  11. {
  12. // put your code here
  13. temperature = temperature + 5;
  14. }
  15. public void cooler()
  16. {
  17. // put your code here
  18. temperature = temperature - 5;
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement