Short Questions for UML State Diagrams

  • 1 Differentiate state dependent objects from state independent objects.

    Answer:

    State Independent Objects
    They are modeless and always responds the same way to an event. For example, if an object receives a message, and the responding method always does the same thing. The object is state-independent with respect to that message.
    State Dependent Objects
    Those object which reacts differently to events depending on their state or mode. For example, a telephone is very state-dependent. The phone's reaction to pushing a particular button (generating an event) depends on the current mode of the phone off hook.


  • 2 Describe the notations available for drawing uml state machine diagram.

    Answer:

    Oval shape represents a state An arrow with a label from one state to another represents a transition A small black circle with arrow into first state represent initial state


  • 3 Draw the state machine for Process Sale use case of the NextGen POS.

    Answer:

    Refer to text book section 29.6.


  • 4 Give examples of some complex reactive objects for which you will have to develop their state diagrams?

    Answer:

    • Physical Devices controlled by software e.g. Phone, car, microwave oven. 
      • They have complex and rich reactions to events, and the reaction depends upon their current mode. 
    • Transactions and related Business Objects 
      • How does a business object (a sale, order, payment) react to an event? For example, what should happen to an Order if a cancel event occurs?
    •  Role Mutators
      • These are objects that change their role. A Person changing roles from being a civilian to a veteran. Each role can be represented by a state.


  • 5 In how many ways the state machines are applied?

    Answer:

    State machines are applied in two ways: 

    1. To model the behavior of a complex reactive object in response to events. 
    2. To model legal sequences of operations protocol or language specifications. This approach may be considered a specialization of #1, if the "object" is a language, protocol, or process. A formal grammar for a context-free language is a kind of state machine.


Contact Us

support@subexpert.com
Write to Us View Help
Subject Expert Logo

Subject Expert

Learn and Evaluate

Follow Us
© 2020 - Subject Expert