The example describes a simple calculator, which is capable of computing sums of integers. The calculator has three buttons, numeric pad and a digital display. The names of the buttons are 'Clear', 'Add' and 'Done'. The 'Init' button is used to start computing a sum, the numeric pad is used to input summands, the 'Add' button is used to enter each next summand and add it to the sum, and the 'Done' button is used to get the computed sum on the display.
The calculator is the system under development in this MSC specification. The name of the system is 'Calculator'. On MSC diagrams, instance with name ‘User’ represents the user of the calculator. The single scenario named 'Sum' describes a computation of a sum. Incorrect actions of the user and abnormal situations are not considered. The computation of each sum is described by MSCs in the following way:
The behavior specified by this MSC specification is represented by HMSC 'Calculator'.