Create a state diagram to show the events that cause a transition from one state to another state, in a class. Build a state diagram for the Reservation class.
The State diagram shows the events that cause a transition from one state of a class to another state. It is a network of states and events. State diagrams capture the class's received stimuli, responses, and actions. Each state receives one or more events, at which time the class transitions to the next state. The next state depends on the current state as well as the events.
Modeling a state diagram is useful for understanding the dynamic behavior of important classes in the system. By important, we mean a class that performs important tasks and can change state often based on system or business events. What is also implied is that you do not need to build a state diagram for every class in the system, just ones you would like to understand better.
Create a state diagram for the Reservation class, since it will be in various states, (provisionally booked, booked, created, destroyed, on hold, and so on). It is important to understand how long the class is in these states, and what events make the class change state.
Learning objectives
After completing the lessons in this module you will know how to:
▪create a new class diagram
▪add an association between classes
▪define an association
▪add associations between other classes
▪build inheritances
▪cross reference class and sequence diagrams
Time required
This module should take approximately 20 minutes to complete.
Prerequisites
If users need to download data or prepare their environments before beginning the module, provide instructions for how to do this. If module prerequisites deviate from tutorial prerequisites, acknowledge this.