Take-A-Number Machine


Story

You are writing an embedded system for a Take-A-Number machine. It is a very simple model. It can give out consecutive numbers and report what was the last number given out.

Tasks

  • Start the machine.
  • Make the machine report its state (last given out number).
  • Make the machine give out a number.
  • Make the machine stop when asked to.
  • Ensure the machine can handle unexpected messages.

Implementations