Open In App

Dynamic modelling in object oriented analysis and design

Last Updated : 02 Dec, 2022
Like Article

Dynamic Modelling describes those aspect of the system that are concerned with time and sequencing of the operations. It is used to specify and implement the control aspect of the system. Dynamic model is represented graphically with the help of state diagrams. It is also known as state modelling. State model consist of multiple state diagrams, one for each class with temporal behavior that is important to an application. State diagram relates with events and states. Events represents external functional activity and states represents values objects.

An event is something that happen at a particular point in particular time such as a person press button or train 15930 departs from Amritsar. Event conveys information from one object to another.

The events are of three types: Signal event, Change event, and Time event.
These are explained as following below.

  1. Signal event :
    A signal event is an particular occurrence in time. A signal is a explicit one-way transmission of information from one object to another.A signal event is the event of sending or receiving signal.When an object send signal to another object it await for acknowledgement but acknowledgement signal is the separate signal under the control of second object, which may or may not choose to send it.The UML notation is (<>) written inside the name at top of the box and in another section list all the signal attributes.Eg:

  2. Change event :
    It is caused by the satisfaction of a boolean expression.The intent of the change event is that the expression is tested continually whenever the expression changes from false to true.The UML notation for a change event is the keyword when followed by a parenthesized boolean expression.

    when(battery power < lower limit)
    when(room temperature < heating/cooling point ) 
  3. Time event :
    It is caused by occurrence of an absolute or the elapse of time interval.The UML notation for absolute time is the keyword when followed by a parenthesized expression involving time and for the time interval is keyword after followed by a parenthesized expression that evaluates time duration.

    when(Date = mar 2, 2005)
    after(50 seconds) 

State :
A state is an abstraction of attribute values and links of an object. Values and links are combined together into a state according to their entire behavior. The response of object according to input event is called state. A state corresponds to the interval between two events received by an object. The state of the event depends on the past event. So basically, state represents intervals of time. The UML notation for the state is a round box containing an optional state name list, list the name in boldface, center the name near the top of the box, capitalize the first letter. Eg:

The following are the important points needs to be remember about state.

  1. Ignore attributes that do not affect the behavior of object.
  2. The objects in the class have finite number of possible states.
  3. Each object can be in one state at a time.
  4. ALL events are ignored in a state, except those for which behavior is explicitly prescribed.
  5. Both events and states depend upon level of abstraction.

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads