0% found this document useful (0 votes)
230 views33 pages

To Object-Oriented Modeling Techniques

The document provides an introduction to object-oriented modeling techniques, specifically object, functional, and dynamic modeling. It describes the four main parts of object-oriented modeling methodology: analysis, system design, object design, and implementation. It then explains the three modeling parts in more detail: the object model represents static structure, the dynamic model represents temporal behavior, and the functional model represents transformational aspects.

Uploaded by

shambhavi sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
230 views33 pages

To Object-Oriented Modeling Techniques

The document provides an introduction to object-oriented modeling techniques, specifically object, functional, and dynamic modeling. It describes the four main parts of object-oriented modeling methodology: analysis, system design, object design, and implementation. It then explains the three modeling parts in more detail: the object model represents static structure, the dynamic model represents temporal behavior, and the functional model represents transformational aspects.

Uploaded by

shambhavi sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 33

Introduction

to
Object-Oriented Modeling techniques

(Object, Functional and Dynamic Modeling)


(Module – 1)
CONTENTS
 Introduction to Object Modeling Technique
 Object model
 Dynamic model
 Functional model
 Relationship between the models
INTRODUCTION
 Object Modeling Technique is a method for analysis, design and implementation
by an object oriented technique.
 Fast and intuitive approach for identifying and modeling all objects making up a
system.
 Class attributes, methods, inheritance and association can be expressed easily.
 Dynamic behavior of the objects can be described by using the OMT dynamic
model.
 Detailed specification of state transitions and their descriptions within a system.
OMT Methodology
Four phases of OMT (can be performed iteratively)
 Analysis: Objects,dynamic and functional models
 System Design: Basic architecture of the system.
 Object Design: Static, dynamic and functional models of
objects.
 Implementation: Reusable, extendible and robust code.
Three different parts of OMT Modeling

Object model Dynamic model Functional model

• Represents the • Represents the • Represents the


static, structural, temporal, transformational,
'data' aspects of a behavioural, 'functional'
system 'control' aspects aspects of a
of a system system
OBJECT MODEL
 The object model describes:
 the structure of the object
 the relationship of one object with other objects
 attributes and operations of the objects.
 Captures the concepts from the real world that are useful for the
application.
 Represented by class diagram and object diagram.
OBJECT DIAGRAM
 Models the instances of classes that are present in class diagram.
 Used to model the static design view of the system.
 Defines the attributes and operations of each object.
 Object diagram contains:

 Objects
 Links
CLASS DIAGRAM
 A graphical representation used for modeling classes and their
relationships.
 Describes all possible objects belonging to the classes.
 Used for abstract modeling and for implementing actual program
 The class diagram is concise and can be understood easily.
 Classes are interconnected by association lines.
OMT Dynamic Model
 States, transitions, events and actions.
 Concerned with the time and sequencing of the operations of the
object.
 Captures control aspect of the system.
 Represented by state transition diagram.
STATE TRANSITION DIAGRAM(1)
 State:
Some behavior of a system that is observable and that lasts for some period of
time.

 A state is when a system is:


 Doing something – e.g., heating oven, mixing ingredients, accelerating engine,
 Waiting for something to happen – Waiting for user to enter password, waiting
for sensor reading.

 Transition:
(Virtually) instantaneous change in state (behavior).
STATE TRANSITION DIAGRAM(2)
 A condition is typically some kind of event, e.g.:
 Signal
 Arrival of an object (data/material)
 An action is the appropriate output or response to the event, e.g.:
 Signal or message
 Transfer of an object,
 Calculation
State Transition Diagram
FUNCTIONAL MODEL
 It describes how one object collaborates with other in order to
achieve behavior of the system.
 Overall behavior of system represented with the help of dynamic and
functional model.
 Includes use case diagram, sequence diagram and activity
diagram.
 Represented by data flow diagram.
The functional model includes:

Use case • Shows how the outsider actors interact


diagram with the system to achieve functionality.

Sequence • Represents the objects that interact and


diagram the time sequence of their interaction.

Activity • Represents flow of control among


diagram various objects.
DATA FLOW DIAGRAM
 Shows flow of data between different processes in a business.
 Simple and intuitive method for describing business processes
without focusing on the details of computer systems.
 Four primary symbols
Data Flow Diagram
Relationship among the Models
 The models are related with each other.
 Every model represents one aspect of the system.
 The object model describes the data structures.
 The dynamic and functional model represents the operations
performed on these data structures.
Object model and dynamic model

 The dynamic model describes the control structure of objects.


 The states of the dynamic model can be related to classes of
attribute and links to values of an object.
 Events and actions can be represented as operations on the object
model.
 The object model concepts of generalization, aggregation and
inheritance also apply to the dynamic model.
Object and functional model

The functional model describes how the objects interact with each other.
All four components of functional model can be related to object model:
 Processes: These are the methods implemented in the objects.
 Actors: These are the objects in the object model.
 Data stores: These are also objects in the object model or attributes of
objects.
 Data flows: These are values in the object model. Data flows to or from
actors represent operations on or by objects. Data flows to or from data
stores represent queries or updates.
Dynamic and functional model

 Dynamic model states when operations are performed.


 Functional model states how they are performed and which
arguments
 Actors are active objects, the dynamic model has to specify when it
acts.
 The data stores are passive objects, they only respond to updates and
queries, therefore you do not have to specify in the dynamic model
when they act.
Example Diagrams
for
Railway Ticket Reservation System
Class Diagram
Use-Case Diagram
Sequence Diagram
State Transition Diagram
Activity Diagram
Difference between Activity and State chart
Diagram
 Activity diagrams are similar to the procedural flow charts.

 The difference is that activity diagrams support description of


parallel activities and synchronization aspects involved in
different activities.

 A state chart diagram is normally used to model how the state of an


object changes in its lifetime.

***
Abstract Data Types
 Abstract Data type (ADT) is a type (or class) for objects whose behavior is defined
by a set of value and a set of operations.

 It is called “abstract” because it gives an implementation independent view. The


process of providing only the essentials and hiding the details is known as
abstraction.

 ADT only mentions what operations are to be performed but not how these
operations will be implemented. It does not specify how data will be organized in
memory and what algorithms will be used for implementing the operations.
Const Keyword
 Constant is something that doesn't change. In C and C++ we use the
keyword const to make program elements constant. const keyword can be used
in many contexts in a C++ program. It can be used with:
 Variables
 Pointers
 Function arguments and return types
 Class Data members
 Class Member functions
 Objects
Defining Class Object as const
 When an object is declared or created using the const keyword, its data members
can never be changed, during the object's lifetime.

 Syntax:
const class_name object;

 For example, if in the class Test defined above, we want to define a constant
object, we can do it like:
const Test r(30);
Example for const Object and const Member function

class StarWars int main()


{ {
public: StarWars objOne(10); // non const object
int i;
const StarWars objTwo(20); // const object
StarWars(int x) // constructor
{
objOne.falcon(); // No error
i = x;
} objTwo.falcon(); // No error

int falcon() const // constant function cout << objOne.i << objTwo.i;
{
/* objOne.gamma(); // No error
can do anything but will not objTwo.gamma(); // Compile time error
modify any data members }
*/
cout << "Falcon has left the Base";
}

int gamma()
{
i++;
}
};

You might also like