31269 Lecture 10: Business Requirements Modelling Notes
Week 10 Lecture: State and Event Modelling
Classes and Objects
• A class is a definition for a collection of objects, and is a template for creating
Objects
• An object is an instance of a class.
• Objects have properties/data/states which are the attributes of the class.
• They also have certain behaviours, which are the methods.
State and Event Modelling
• A state transition diagram shows the various states of a single object.
o There must be a separate state transition diagram for each object/class in
your diagram. It is in a 1-1 relationship.
o A state transition diagram helps analysts, designers and developers
understand the behaviour of the objects in the system. They ensure that
those ioled o’t hae to guess hat a ojet is supposed to do.
o Used to track an ojet’s lifeyle, ith the status of a ojet at a gie
point in time provided.
o Movement from one state to another is called transition, and is triggered by
an event. When its triggering event occurs, a transition is said to fire.
• Objects change their state in response to time, and non-time related events.
• Each time an object changes state, some of its attributes must change. There must
be a method in the object to change the attributes.
Syntax for State Transition Diagram
• Initial State – shows the starting point and is denoted by a solid circle.
• State – represents state of an object at an instance of time. Denoted by a rectangle
with rounded corners and compartments.
• Transition – An arrow indicated state transition from one state to another. Trigger
event and action is written beside the arrow, separated by a slash.
• Final State – Ed of the state diagra, sho y a ull’s eye syol.
find more resources at oneclass.com
find more resources at oneclass.com
Document Summary
Classes and objects: a class is a definition for a collection of objects, and is a template for creating. Objects: an object is an instance of a class, objects have properties/data/states which are the attributes of the class, they also have certain behaviours, which are the methods. State and event modelling: a state transition diagram shows the various states of a single object, there must be a separate state transition diagram for each object/class in your diagram. It is in a 1-1 relationship: a state transition diagram helps analysts, designers and developers understand the behaviour of the objects in the system. When its triggering event occurs, a transition is said to fire: objects change their state in response to time, and non-time related events, each time an object changes state, some of its attributes must change. There must be a method in the object to change the attributes.