Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Heater
- {
- // instance variables - replace the example below with your own
- private double temperature;
- public Heater()
- {
- // initialise instance variables
- temperature = 15;
- }
- public void warmer()
- {
- // put your code here
- temperature = temperature + 5;
- }
- public void cooler()
- {
- // put your code here
- temperature = temperature - 5;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement