Special States The initial state is the state entered when an object is created. An initial state is mandatory. Only one initial state is permitted. The initial state is represented as a solid circle. A final state indicates the end of life for an object. A final state is optional. A final state is indicated by a bull's eye. More than one final state may exist. Sample Sample State 1 State 2 Object Oriented Analysis and Design 6
Object Oriented Analysis and Design 6 Special States The initial state is the state entered when an object is created. ▪ An initial state is mandatory. ▪ Only one initial state is permitted. ▪ The initial state is represented as a solid circle. A final state indicates the end of life for an object. ▪ A final state is optional. ▪ A final state is indicated by a bull’s eye. ▪ More than one final state may exist. Sample State 1 Sample State 2
What Are Events? An event is the specification of a significant occurrence that has a location in time and space. An event is an occurrence of a stimulus that can trigger a state transition. Example: Adding a student to a course ·Creating a new course Event State A State B Object Oriented Analysis and Design 7
Object Oriented Analysis and Design 7 What Are Events? An event is the specification of a significant occurrence that has a location in time and space. ▪ An event is an occurrence of a stimulus that can trigger a state transition. ▪ Example: • Adding a student to a course • Creating a new course State A State B Event