Behavior : State Machine Diagrams - What is a State and State Machine - Finding States

3 important questions on Behavior : State Machine Diagrams - What is a State and State Machine - Finding States

Consider a Patron in a library, as shown in Table 18.1.

The table shows some states that an object of class Patron can be in by using a constraint-based expression of the attributes values of the particular Patron.

Give a few examples of shows some states that an object of class Patron can be in by using a constraint-based expression.

As you should be able to see, that while Adult, Minor, and Senior are mutually exclusive, the other states need not be.

As defined below, they are independent of Living and InGoodStanding.

However, because we have included Living as part of the definition of InGoodStanding, we have introduced a dependency between them. 
   

 

Examine the table.

We can also define states based on.... ?

We can also define states based on the navigability to other objects or their properties

States can also be defined by ongoing (or implied) operations.

Such operations need to take some time and states are typically only useful if the operation is waiting for something. 


Give an example of an ongoing (or implied) state.


For example, consider:

  • (Patron) Waiting for a Reserved Book to Become Available

  • (Rider) Waiting for Hailed Ride

  • (Driver) Cruising for a Hail

  • (Book) Shelved


These ongoing operations can often be found in Activity Diagrams when an Action requires an external input to move to the next Action.

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo