You are on page 1of 21

Object Oriented Analysis & Design

Book: Applying UML and Patterns


An Introduction to Object-Oriented Analysis and Design and the Unified Process
3rd Edition By Craig Larman

Lecture 1
Introduction
Sajiya Tariq
OOAD Basic Concepts
Object oriented concepts have become quiet
popular in the area of computer programming
with the promise of
Interchangeable
Reusable
Easily updateable
Easily interconnected
software parts.
OOAD Basic Concepts
The Magic Concept
Data or Software can be Containerized
Everything goes into a box and there can be boxes
within boxes

Whereas in a object oriented language each step


might be a whole box full of instructions.
OOAD Basic Concepts
The central concept of object oriented design is
the object
Definition: an object is a distinct software unit
that contains a collection of related variables
(attributes /data) and methods (procedures)
Generally these methods and variables are not
directly visible outside the object. Rather well
defined interfaces exist that allow other software
units to have access to these variables and
methods.
OOAD Basic Concepts
An object represents some thing be it a
physical entity
a concept
a software module
The value of the variables in the object express the
information that is known about the thing that the object
represents.
The methods include procedures whose execution affect
the values in the object and possibly also affect the thing
being represented.
OOAD Basic Concepts
An objects knows things (called attributes) and does things (called
services)
I am a I am customer.
shopping
cart.
? ? ?
? ? I am a
business
I am an transaction.
item.
OOAD Basic Concepts
Object - Objects have states and behaviors.

Example: A dog has states - color, name, breed as well


as
behaviors - wagging, barking, eating.

An object is an instance of a class.

Class - A class can be defined as a template/blue print


that describes the behaviors/states that object of its type
support.
OOAD Basic Concepts
Class: A group of like objects make up a class

Class: Item I am an object of the class


Item.
I know my manufacture date
and my arrival code
I can check my availability
OOAD Basic Concepts
Classes can be specialized

Class: Perishable Item

I am an object of the class Item.


I know my manufacture date and my arrival
code and expiration date.
I can check my availability
OOAD Basic Concepts
Encapsulation
The principle that an object should hides things
from other objects, limiting visibility about
what I am n what I do

DATA
Private Functions
calculate sales urgency

Public Functions
check availability
OOAD Basic Concepts
Inheritance
The principle that a class can extend from
another previously defined class. The guiding
principle is arrange classes in generalization/
specialization.
Generalization Specialization

Class: Item Class: Perishable Item


I am an item I am an perishable item
OOAD Basic Concepts
Polymorphism
The principle that objects in different classes
may understand the same message yet
respond in different ways
Check Availability

I do it my way I do it my way
OOAD Basic Definitions
Object
An abstraction of the real world entity.
Object Class
A named set of objects that share the same names,
sets of attributes and services.
Object Instance
A specific member of an object class, with some
values assigned to the attributes.
OOAD Basic Definitions
Attribute
Data variables contained within an object
Method
A procedure that is part of an object and that can
be activated from outside the object to perform
certain functions.
Message
The means by which objects interact
Service
A function that performs an operation on an
object
OOAD Basic Definitions
Containment
A relationship between two object instances in
which the containing object includes a pointer to a
contained object
Encapsulation
The isolation of the attributes and services of an
object instance from the external environment.
Services may only be invoked by name and
attributes may only be accessed by the means of
the services.
OOAD Basic Definitions
Inheritance
A relationship between two object classes in which
the attributes and services of a parent class are
acquired by a child class
interface
A description closely related to an object class. An
interface contains method definitions (without
implementations) and constant values. An
interface can not be instantiated.
OOAD Basic Definitions
Polymorphism
This refers to the existence of multiple objects that
use the same names for services and present the
same interface to the external world but that
represents different types of entities.
Object-Oriented Analysis-1
ObjectOriented Analysis (OOA) is the
procedure of identifying software engineering
requirements and developing software
specifications in terms of a software systems
object model, which comprises of interacting
objects.
Object-Oriented Analysis-2
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 behavior of the objects, i.e., object actions
Describing how the objects interact
The common models used in OOA are use cases and
object models.
Object-Oriented Design-1
ObjectOriented Design (OOD) involves
implementation of the conceptual model
produced during object-oriented analysis. In
OOD, concepts in the analysis model, which are
technologyindependent, 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.
Object-Oriented Design-2
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.

You might also like