Accessible Apps, Part 2 Problems

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6

Create a Thermostat: Behavior

In this second of three thermostat apps, build off the existing program and add a behavior to the raise and lower buttons. To do this, build out the TemperatureBehavior.quorum. This behavior will need to get the button that was selected from the event parameter. It will also need to access the temperature variable from the form. Using these two items, decide which button was clicked. Then either raise or lower the temperature by one. Next, be sure to update the temperature stored in the form.

Once the behavior has been built, connect the behavior to each of the buttons. In Main.quorum, create a TemperatureBehavior object using the blocks in the tray. Then use the blocks that call SetBehavior for the buttons.

Coding:

Blocks

PreviousNext