Professional Documents
Culture Documents
Object Orientation and Design: Methodology & Conceptualization
Object Orientation and Design: Methodology & Conceptualization
Object Orientation and Design: Methodology & Conceptualization
Encapsulation
Abstraction
Modularity
Hierarchy
What is Abstraction?
• Abstraction is one of the very important concepts
of object oriented systems.
Manages Complexity
What is Encapsulation?
Encapsulation, or information hiding, is the
feature of separating the external aspects of an
object, from the internal implementation details of
that object.
It helps in hiding the actual implementation of
characteristics of objects.
Encapsulation enables you to combine data
structure and behaviour in a single entity.
Encapsulation helps in system enhancement.
Improves Resiliency
What is Modularity?
The breaking up of something complex into manageable
pieces.
“It is a property of a system that has been decomposed
into cohesive and loosely coupled modules”
Cohesion and coupling gives two goals for defining
modules.
Module cohesive (shared data structures, similar classes)
with an interface that allows for minimal inter-module
coupling.
Manages Complexity
What is Hierarchy ? Asset
Increasing
abstraction
◦ Software entity
Chemical Process
What is an Object ?
An object is a concept, abstraction, or thing
with sharp boundaries and meaning for an
application
An object is something that has:
◦ State
◦ Behavior
◦ Identity
Representing Objects
An object is represented as rectangles with underlined names
: Professor
a + b = 10
ProfessorClark
Class Name Only
Professor Clark
ProfessorClark :
Professor Object Name Only
Pyramid
Elided/Iconic
Representation
Shape Cube
Tube
<<interface>>
Canonical
Shape
Pyramid
(Class/Stereotype) Draw
Representation Move
Scale
Rotate Cube
Package Name
Uses
◦ Organize the model under development
◦ A unit of configuration management
What is a Subsystem?
A combination of a package (can contain other model elements) and a
class (has behavior)
Realizes one or more interfaces which define its behavior
Realization
Subsystem
<<subsystem>>
Interface Subsystem Name
Interface
<<subsystem>> Component
Component Name Name
Component Component
Interface Interface
Dependency
Generalization
Realization
Relationships: Association
Models a semantic connection among classes
Association Name
Association
Role Names
Class University
Professor
Employee Employer
Relationships: Aggregation
A special form of association that models a whole-part
relationship between an aggregate (the whole) and its parts
Whole Part
Student Schedule
Aggregation
Relationships: Composition
A form of aggregation with strong ownership and
coincident lifetimes Part
◦ The parts cannot survive the whole/aggregate
Whole
Student Schedule
Aggregation
Association: Multiplicity and
Navigation
Multiplicity defines how many objects participate
in a relationships
◦ The number of instances of one class related to ONE
instance of the other class
◦ Specified for each end of the association
Associations and aggregations are bi-directional by
default, but it is often desirable to restrict
navigation to one direction
◦ If navigation is restricted, an arrowhead is added to
indicate the direction of the navigation
Association: Multiplicity
Unspecified 1
Navigation
Relationships: Dependency
A relationship between two model elements where a
change in one may cause a change in the other
ClientPackage SupplierPackage
Dependency
relationship
Relationships: Generalization
A relationship among classes where one class
shares the structure and/or behavior of one or
more classes
Defines a hierarchy of abstractions in which a
subclass inherits from one or more super-classes
◦ Single inheritance
◦ Multiple inheritance
Generalization is an “is-a-kind of” relationship
Example: Single Inheritance
Ancestor
One class inherits from another
Account
balance
name
Superclass number
(parent) Withdraw()
CreateStatement()
Generalization
Relationship
Checking Savings
multiple
inheritance
register( )
generalization
<<boundary>>
MyBoundaryClass
MyBoundaryClass
Example: Stereotypes
<<boundary>>
<<boundary>>
Sample boundary class (stereotype)
<<trace>> Stereotype of ‘dependency relation’
DesignClass Stereotype of <<Processor>>
<<Processor>>
Processor #1 Processor #1
Notes
A note can be added to any UML element
Notes may be added to add more information to the diagram
It is a ‘dog eared’ rectangle
The note may be anchored to an element with a dashed line
PersistentClass
{persistence} anObject : ClassA
{location=server}
Constraints
Supports the addition of new rules or modification of existing rules
Member 1
Professor Department
1..*
Department Head {subset}
1 1
Object Modeling Technique (OMT)
Rumbaugh’s Object Modeling Technique (OMT)
-A method for analysis,design and implementation by
an object oriented technique.
-fast and intuitive approach for identifying and
modeling all objects that build-up a system.
-Class attributes, methods, inheritance and association can
be expressed easily.
-Dynamic behavior of objects can be described using
the OMT dynamic model.
-Detailed specification of state transitions and their
-descriptions within a system
Why modeling
Blue print
Clarity
Familiarity
Maintenance
Simplification
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
An object model - object diagram & data dictionary
A dynamic model - state diagrams & event flow diagrams
A functional model - data flow & constraints
Object Model
structure of objects in a system.
Identity, relationships to other objects, attributes and operations.
Object diagram
Object Diagram
Classes interconnected by association lines
Classes- a set of individual objects
Association lines- relationship among classes (i.e., objects of one class
to objects of another class)
OMT Dynamic Model
States, transitions, events and actions
OMT state transition diagram-network of states and events
OMT Functional Model
DFD- (Data Flow Diagram)