Professional Documents
Culture Documents
MODELING, CONCEPTS
AND PRINCIPLES
• What is object-oriented development ?
• Object-oriented process model
• Object-oriented concepts
• Object modeling technique
• Unified Modeling Language (UML)
• Concepts and Principles of Object Modeling
• Object-oriented vs functional approach
CONTENTS
What is OO Development ?
• “New” way of thinking about problems using
models organized around real world concepts.
• The fundamental construct is the object
o Combines both data structure and operations in a
single entity called an object.
• Leads to reuse, faster software development
and higher quality programs.
• Easier to maintain
o Structure inherently decoupled
o Fewer side-effects
The OO process model
• Moves through an evolutionary spiral
• Emphasizes development of reuse capability
Object Oriented Concepts
• Objects and Object Model
o Object: Data and operations relevant to some real
world or significant program entity encapsulated
into a monolithic unit accessible only through a
well defined interface. For ex. File in the file
system together with operations such as open,
close, read, & write,
o Object Model: Describes the structure of the
objects in the system
their identity, relationships to other objects, attributes
and operations.
Object Modeling
• Classification & Classes
o A class describes a group of objects with similar
properties (attributes), common behavior
(operations), common relationships to other
objects, and common semantics.
• Thus, a class is an abstraction that describes
relevant properties and hides the rest.
Represented diagrammatically as below.
Class Name
Attributes
Operations
Object Classes
Object Modeling
Object Modeling
• Attributes: An attribute is a data value held by
the objects in a class. Name, age, and weight
are attributes of Person objects.
Object Modeling
• Operations and Methods :
o Operations : An operation is a function or
transformation that may be applied to or by objects
in a class. Each operation has a target object as an
implicit argument. The behavior of the operation
depends on the class of its target.
o Methods : A method is the implementation of an
operation for a class.
Categories: 1) manipulate data, 2) perform computation,
and 3) monitor for occurrence of controlling event.
Object Modeling
• An operation may have arguments in addition
to its target object. Such arguments
parameterize the operation but do not affect
the choice of method.
Class and Instance
Polygon Polygon
Vertices v={(0,0),(0,1),(1,0)}
Border Color BC = Red
Fill Color FC = Blue
Draw Draw
Erase Erase
Move Move
Abstraction and Encapsulation
Abstraction and Encapsulation
• Abstraction
o Isolate those aspects that are important and
suppress (or hide) those that are unimportant
(e.g., representations).
o Focus on what object is and does before deciding
how it should be implemented.
o Abstraction allows dealing only with application
domain concepts, not making design and
implementation decision before problem is
understood.
Abstraction and Encapsulation
<<Interface>>
Class Name
Operations
Operations
Polymorphism
Polygon Car
Paint Paint
Triangle Square
Paint Paint
Communication
• Message: [destination, operation, params]
What Does OO Mean?
• Pressman (Coad & Yourdon)
o Objects (identity)
o Classification
o Inheritance
o Communication
• Rumbaugh
o Objects (identity)
o Classification
o Inheritance
o Polymorphism
• Object modeling technique (OMT) extends from
analysis thru design to implementation
• Analysis model contains objects found in the
application domain, including properties of object
and their operations.
• These application domain objects form a
framework to the design model.
OO Progress Tracking
• Easier to maintain • Harder to maintain
• Combines data • May separate data and
structure and behavior behavior
in a single entity • Emphasizes
• Emphasizes object procedural structure
structure • Reuse limited, hence
• Reuse more readily possible delay in
accomplished software construction