You are on page 1of 27

By:Ashish Rajak CSE/039/08

The design of object oriented software requires the

definition of a multilayered software architecture, the specification of subsystems that perform required functions and provide infrastructure support, a description of objects (classes) that form the building blocks of the system, and a description of the communication mechanisms that allow data to flow between layers, subsystems, and objects. Objectoriented design accomplishes all of these things.

Objects are abstractions of real-world or system

entities and manage themselves. Objects are independent and encapsulate state and representation information. System functionality is expressed in terms of object services. Shared data areas are eliminated. Objects communicate by message passing. Objects may be distributed and may execute sequentially or in parallel.

Who does it? OOD is performed by a software engineer.

What are the steps? OOD is divided into two major activities: system

design and object design.

The system design process consists the following

activities: Partition the analysis model into subsystems. Identify concurrency that is dictated by the problem. Allocate subsystems to processors and tasks. Develop a design for the user interface. Choose a basic strategy for implementing data management. Identify global resources and the control mechanisms required to access them.

Object design is concerned with the detailed design of

the objects and their interactions. It is completed within the overall architecture defined during system design and according to agreed design guidelines and protocols. Object design is particularly concerned with the specification of attribute types, how operations function, and how objects are linked to other objects.

The following characteristics are

generally understood to be included


Identity: Two Objects with the same attribute values are

distinct. Classification: Objects with the same attributes and behaviour are grouped into Classes. Polymorphism: The same procedure name may be used by different Classes to invoke different code. Inheritance: Allows a Class to be defined as a sub-type of another Class. Encapsulation: Separates the external interface of an Object from its internal implementation details.

Class refers to a template for a group of individual

objects with common attributes and common behavior The difference between an Object and a Class is that the class defines shared attributes and behaviors of objects An object is an instance or occurrence of a class

UML (Unified Modeling Language) is the result of a

collaboration of individual object-oriented methods that has been adopted as a standard for modeling object-oriented systems
UML has three categories:
Things, the objects Relationships, the glue that holds things together

Diagrams, categorized as either structure or behavioral

The Diagrams Use-case Diagram Class Diagram Object Diagram State Diagram

Sequence Diagram
Collaboration Diagram Activity Diagram Component Diagram Deployment Diagram

Take out policy

Sales stats. Customer Customer stats. Insurance Salesperson

Describe functionality requirements of the system, i.e.

functional spec. May be described in plain text. May be supported by activity diagrams or state diagrams.

1 owns Customer

1..* contains Portfolio

1..* handles

1 Trader

0..* 0..*
Instrument

Bond

Stock

Stock Option

Depicts static structure of classes.

Development of Entity-Relationship Diagrams


Classes represent things in the system. Classes may be related in many ways
Associated Dependant Specialised Packaged

On first floor
Arrive first floor

Go up(floor)

Moving up

Moving to first floor


Moving down timeout

arrived
arrived

Go up(floor)

idle Go down(floor)

2
3 4

Classes & Objects The Class Diagram Associations Aggregation & Composition Generalisation

Classes, Objects and their relationships are the

primary modelling elements in the OO paradigm. A class is to a type as an object is to an instance.

OBJECT

Object Identity Object State

Attributes contained in data structures Procedures which can operate on the data structures

Object behaviour

Classname Classname

OR

attribute: datatype

operation (args: type): type

Associations model Class relationships. Associations should be named where appropriate. Usual to

use verbs from the problem domain. Roles played by classes may also be named. Associations have a cardinality. Rules from programming about sensible names apply.

Special type of association, consists of, contains,

part of identify it. Two types


Shared Aggregation. Composition Aggregation.

One person may be a member of many teams. Person is part of team, shared by N teams.

Team
Members

Person

More restrictive. Strong ownership here.

Rules
Parts live inside whole, parts die with whole, like

automatic variables. Multiplicity on whole side must be 0..1, on part side may be anything.
Composition aggregation forms a tree of parts, shared

forms a network of parts.

Generalisation and Inheritance allow sharing of

similarities among Classes while also preserving differences. Inheritance refers to mechanism of sharing attributes & operations between subclasses and their superclass. Default values of attributes & methods for operations may be overridden in subclass.

General
Car

Specific
Estate Saloon Hatchback Coupe

Easier maintenance. Objects may be

understood as stand-alone entities. Objects are potentially reusable components. For some systems, there may be an obvious mapping from real world entities to system objects.

Software Engineering A Practitioner's Approach-Roger

S. Pressman

Using UML: software engineering with objects and components. http://www.dcs.ed.ac.uk/home/pxs/Book/

You might also like