Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class
- APPLICATION
- create
- make
- feature {NONE} -- Initialization
- make
- -- Run application.
- local
- sensor: TEMPERATURE_SENSOR
- display: DISPLAY
- controller: HEATING_CONTROLLER
- do
- create sensor.make
- create display
- create controller.set_goal (20)
- sensor.register (agent display.show)
- sensor.register (agent controller.adjust)
- -- Hardware simulation:
- sensor.set_temperature (0)
- sensor.set_temperature (10)
- sensor.set_temperature (20)
- sensor.set_temperature (30)
- sensor.set_temperature (25)
- sensor.set_temperature (20)
- sensor.set_temperature (20)
- sensor.set_temperature (-20)
- sensor.set_temperature (-10)
- sensor.set_temperature (0)
- sensor.set_temperature (15)
- sensor.set_temperature (18)
- sensor.set_temperature (20)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement