Page 81 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 81

Unit 6: State Modelling




          readCard is performed. Note, that transition from Serving Customer state back to the Idle state  Notes
          could be triggered by cancel event as the customer could cancel transaction at any time.

                         Figure 6.21: Behavioral  State  Machine Example - Bank ATM





































          Source: http://www.uml-diagrams.org/examples/bank-atm-example.html
          Serving Customer state is a composite state with sequential substates Customer Authentication,
          Selecting Transaction and Transaction. Customer Authentication and Transaction are composite
          states by themselves which is shown with hidden decomposition indicator icon.  Serving
          Customer state has triggerless transition back to the Idle state after transaction is finished. The
          state also has exit action ejectCard which releases customer’s card on leaving the state, no matter
          what caused the transition out of the state.

          Self Assessment

          Fill in the blanks:

          7.   .................. describe all of the possible states of an object as events occur.
          8.   A ..................pseudo-state is shown with one transition arrives and two or more transitions
               leaving.

          9.   .................. pseudo-states are used to chain together multiple transitions.
          10.  Entering a .................. pseudo-state indicates that the lifeline of the state machine has
               ended.

          11.  A .................. state is used to remember the previous state of a state machine when it was
               interrupted.
          12.  .................. are used to demonstrate the behavior of an object through many use cases of the
               system.


                                           LOVELY PROFESSIONAL UNIVERSITY                                   75
   76   77   78   79   80   81   82   83   84   85   86