I am interested in writing a GUI application that simulates the behavior of a cheap infix calculator.  As the user interface, this calculator has on the outside:

·        10 buttons labeled 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, respectively,

·        one button labeled +,

·        one button labeled *,

·        one button labeled =,

·        and a display screen

for me to view the input and the result of my desired computation.  Inside is perhaps some kind of electronic circuit board capable of carrying out the actual computations.

The behaviors of my calculator can be modeled as a finite state machine as shown below.