Object-Oriented Modeling
Lesson 1:
Intro. to Object-Oriented Modelling
2
WHAT IS OBJECTED ORIENTED MODELLING?
Object-oriented modelling is a way of thinking about problems using models organized
around real world concepts.
3
OBJECT
The fundamental construct is the object, an instance of a class, which combines both
data structure and behaviour.
4
An object is a real-world element in an object–oriented environment that may have a
physical or a conceptual existence.
An object is a collection of data with associated behaviours.
Each object has:
State that determines the characteristic properties of an object as well as the values
of the properties that the object holds.
Identity that distinguishes it from other objects in the system.
Behaviour that represents externally visible activities performed by an object in
terms of changes in its state.
5
Objects can be modelled according to the
needs of the application.
An object:
may have a physical existence, like a
customer, a car, etc.;
or an intangible conceptual existence,
like a project, a process, etc.
6
CLASS
A class represents a collection of objects having same characteristic properties that
exhibit common behaviour.
It gives the blueprint or description of the objects that can be created from it.
Object is an instance of a class.
Creation of an object as a member of a class
is called instantiation.
instantiation
7
The constituents of a class are:
A set of attributes for the objects that are to be instantiated from the class.
Generally, different objects of a class have some difference in the values of the
attributes. Attributes are often referred as class data.
A set of operations that portray the
behaviour of the objects of the class.
Operations are also referred as
functions or methods.
8
OBJECT VS. CLASS
9
ANALYSIS, DESIGN, AND IMPLEMENTATION IN SDLC
Any software development approach goes through the following stages:
Analysis
Design
Implementation
10
OBJECT-ORIENTED ANALYSIS
Object–Oriented Analysis (OOA) is the procedure of identifying software engineering
requirements and developing software specifications in terms of a software system’s
object model, which comprises of interacting objects.
In other words, Object Oriented Analysis is the process of examining a problem,
system or task and identifying the objects and interactions between them.
In this course, we will introduce Requirement Engineering (RE), which is an
important phase in the Software Development Life Cycle (SDLC).
11
The primary tasks in object-oriented
analysis (OOA) are:
Identifying objects
Organizing the objects by creating object
model diagram
Defining the internals of the objects, or
object attributes
Defining the behaviour of the objects, i.e.,
object actions
Describing how the objects interact
12
OBJECT-ORIENTED DESIGN
Object–Oriented Design (OOD) involves implementation of the conceptual model
produced during object-oriented analysis.
In OOD, concepts in the analysis model, which are technology−independent, are
mapped onto implementing classes, constraints are identified and interfaces are
designed, resulting in a model for the solution domain, i.e., a detailed description of
how the system is to be built on concrete technologies.
13
The implementation details generally include:
Restructuring the class data (if necessary),
Implementation of methods, i.e., internal data structures and algorithms,
Implementation of control, and
Implementation of associations.
OBJECT ORIENTED PROGRAMMING (IMPLEMENTATION & 14
DEVELOPMENT)
OOP is a way of programming that focuses on using objects
and classes to design and build applications.
Major pillars of Object Oriented Programming (OOP) are:
Abstraction
Encapsulation
Inheritance
Polymorphism
Object-oriented means that we organize software as a
collection of discrete objects (that incorporate both data
structure and behaviour).
OOP Features 15
The important features of object–oriented programming are:
Bottom–up approach in program design
Programs organized around objects, grouped in classes
Focus on data with methods to operate upon object’s data
Interaction between objects through functions
Reusability of design through creation of new classes by adding features to
existing classes
16