2. TABLE OF
CONTENT
MODEL
TYPES OF MODEL
CLASS MODEL
EXAMPLE OF CLASS
MODEL
STATE MODEL
EXAMPLE OF STATE
MODEL
RELATION OF CLASS
MODEL AND STATE
MODEL
4. MODEL
Models are forms of description often adopted in software development. They are abstractions used to
represent and communicate what is important, devoid of unnecessary detail, and to help developers
deal with the complexity of the problem being investigated or the solution being developed.
Purpose:
For better understanding of the system.
Characteristics:
Simplified
Consistent
Abstraction of system
Understandable
Less complex
7. Class Model: The class model shows all the classes present in the system. The class
model shows the attributes and the behavior associated with the objects. The class
diagram is used to show the class model. The class diagram shows the class name
followed by the attributes followed by the functions or the methods that are associated
with the object of the class. Goal in constructing class model is to capture those concepts
from the real world that are important to an application.
State Model: State model describes those aspects of objects concerned with time and the
sequencing of operations – events that mark changes, states that define the context for
events, and the organization of events and states. Actions and events in a state diagram
become operations on objects in the class model. State diagram describes the state model.
Interaction Model: Interaction model is used to show the various interactions between
objects, how the objects collaborate to achieve the behavior of the system as a whole.
The following diagrams are used to show the interaction model:
Use Case Diagram
Sequence Diagram
Activity Diagram
9. CLASS MODEL
The class model shows all the classes present in the system. The class model shows the attributes and the
behavior associated with the objects. The class diagram is used to show the class model. The class diagram
shows the class name followed by the attributes followed by the functions or the methods that are associated
with the object of the class. Goal in constructing class model is to capture those concepts from the real world
that are important to an application.
Class model defines the structure of the entire system by identifying the static structure of objects in that
system. A class model defines attributes and operations for the objects of each class and also the relationship
between the objects in the systems.
A class model prepares the platform for the other two models i.e. the state model and interaction model.
Class model is considered important as it represents the graphical representation of the entire system and
helps in analysis while communicating with the customers.
The motive behind constructing the class model is to concentrate on those concepts of real world that are
important from the application point of view. In this section, we will discuss the class model along with its
elements like the objects, classes, links and association between the classes.
11. EXAMPLE OF CLASS MODEL
We can define a class as a group of objects possessing the same attributes and the same operations. An
object is said to be an instance or an occurrence of the class. To understand this in a better way consider
a class Person. Look at the image below you can observe, two objects of the class person i.e. Joe and
Smith. They share the same attributes such as name, city and same operation such as change-city,
change-job.
13. STATE MODEL
State model describes those aspects of objects concerned with time and the sequencing of operations –
events that mark changes, states that define the context for events, and the organization of events and
states. Actions and events in a state diagram become operations on objects in the class model. State
diagram describes the state model.
A state model describes the timely behaviour of the class objects over a period of time. A state model
has multiple state diagrams where each state diagram describes a class in the model.
State model shows these changes in the object with the help of states, events,
transitions and conditions. Events are the incidents that occur to the object at a particular time whereas
the state shows the value of the object at a particular time. In this section, we will discuss state model
along with its elements and importance.
15. EXAMPLE OF STATE MODEL
The diagram example represents the state diagram for a chess game.
The rounded boxes with a name are the states. The arrowed lines are the transitions and arrowhead points to
the target state. The labels over the transition lines are the event that lets the transition and change of states
occur.
Each state diagram in the state model is presented in the rectangular frame and the name of the corresponding
state diagram is written in the pentagonal tag at the left corner of the rectangular frame as you can see in the
figure above. Guard conditions are optional are if required are written in square brackets just beside the
events.
17. RELATION OF CLASS MODEL
AND STATE MODEL
A state diagram describes all or part of the behaviour of the objects of a given class.
States = classes of values & link for an object.
State model of a class is inherited by its subclasses. Subclass inherits both the state & Transitions.
It is also possible to refine an inherited state diagram by expanding state into nested state or concurrent
sub diagrams.
State structure is related to and constrained by class structure.
A composite state is the aggregation of more than one concurrent substate.
Try to make the state diagrams of subclasses independent of the state diagrams of their
superclasses.