Sie sind auf Seite 1von 26

Object Oriented Analysis and Design

by

Digmabar Powar
SS ZG514 Object Oriented Analysis and Design

6/24/2013

Text Books:
1 Larman, Craig, Applying UML and Patterns: An Introduction to Object-Oriented Analysis, Pearson Education, 3nd Ed., 2008. 2 Grady Booch et al., Unified Modeling Language User Guide, Pearson Education, 2009. 3 Ali Bahrami, Object Oriented Systems Development using Unified Modeling Language, McGraw Hill, 2010
SS ZG514 Object Oriented Analysis and Design

6/24/2013

Evaluation Components
EC No. Evaluation Component & Type of Examination EC-1 Assignment/Quiz Duration Weightage 10% Day, Date, Session,Time

EC-2 EC-3

Mid-Semester Test (Closed Book) Comprehensive Exam (Open Book)

Details will be announced on LMS Taxila website 2 Hours


3 Hours

Details will be announced on LMS Taxila website


Sunday, 12/02/2012 (FN) 10 AM 12 Noon Sunday, 08/04/2012 (FN) 9 AM 12 Noon

30% 60%

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Course Review
Concepts of Object Orientation UML notations Design Patterns Object Oriented Analysis and Design using UML and Patterns Case Studies

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Civil engineering Projects Vs Software Projects


Design document Vs Textual document Example: kill him not, leave him kill him, not leave him (miss interpreted)

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Object-Oriented Vs Traditional analysis

OO technique provides a more consistent approach to system modelling. OO view more closely reflects the real world where humans are used to think in terms of things which possess both attributes and behaviours. OO provides reuse possibility from the class hierarchy views of the system. OO analysis centers on objects which combines data and methods. Software extensibility is easy.
SS ZG514 Object Oriented Analysis and Design

6/24/2013

The Basic Principles of Object Orientation


Four basic principles: Abstraction Encapsulation Modularity Hierarchy

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Abstraction

An abstraction denotes the essential characteristics of an object that distinguish it from all other kinds of objects and thus provide crisply defined conceptual boundaries, relative to the perspective of the viewer. [Boo94] Key concepts: Concentrating only on essential characteristics
Abstraction is relative to the perspective of the viewer
Many different views of the same object are possible.
Allows complexity to be more easily managed

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Example: Abstraction

6/24/2013

SS ZG514 Object Oriented Analysis and Design

Encapsulation
Encapsulation is the practice of including in an object everything it needs hidden from other objects. The internal state is usually not accessible by other objects.

Key concepts: Packaging structure and behavior together in one unit


Makes objects more independent

Objects exhibit an interface through which others can interact with it Hides complexity from an objects clients
6/24/2013 SS ZG514 Object Oriented Analysis and Design 10

Modularity
Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules. Module: a collection of related classes of objects

Key concepts: Modules are cohesive (performing a single type of tasks)


Makes modules more reusable

Modules are loosely coupled (highly independent)


Makes modules more robust and maintainable
SS ZG514 Object Oriented Analysis and Design

6/24/2013

11

Example: Modularity

6/24/2013

SS ZG514 Object Oriented Analysis and Design

12

Hierarchy
Hierarchy is a ranking or ordering of abstractions OR Organizing things into different levels of abstraction Types of hierarchies: Class Aggregation Containment Inheritance Partition Specialization
SS ZG514 Object Oriented Analysis and Design

6/24/2013

13

Example: Hierarchy

6/24/2013

SS ZG514 Object Oriented Analysis and Design

14

Basic Concepts of Object Orientation


Object Class Attribute Operation Component Package

6/24/2013

SS ZG514 Object Oriented Analysis and Design

15

Object An object represents an individual, identifiable item, unit, or entity, either real or abstract, with a well-defined role in the problem domain. Or An "object" is anything to which a concept applies. Also, object is an instance of a class
6/24/2013 SS ZG514 Object Oriented Analysis and Design 16

An object can be A physical entity (car, fan, man, etc) A conceptual entity (A chemical process) A software entity (stack, queue, linked list)

6/24/2013

SS ZG514 Object Oriented Analysis and Design

17

Objects have the following qualities: Identity: Objects are distinguishable from one another Behavior: Objects can perform tasks State: Objects store information that can vary over time

6/24/2013

SS ZG514 Object Oriented Analysis and Design

18

Class

A class is a blueprint that describes an object and defines attributes and operations for the object Classes use abstraction to make available only the elements essential to defining the object Classes use encapsulation to enforce an abstraction Simple terms: It is a collection of objects

6/24/2013

SS ZG514 Object Oriented Analysis and Design

19

Relations between Objects and Classes

A class is an abstract definition of an object


It defines the structure and behavior of each object in the class It serves as a template for creating the objects

Objects are grouped into classes

6/24/2013

SS ZG514 Object Oriented Analysis and Design

20

Difference between Structures and Classes


Structures
Can define data members, properties, and methods Extensible by inheritance Default access type is public

Classes
- do Do not support inheritance Default access type is private

The convention is to use Use classes when we require data structure when the purpose is to abstraction and, perhaps group data inheritance.

6/24/2013

SS ZG514 Object Oriented Analysis and Design

21

Attributes: It describes the state (data) of an object Operation: Define its behavior

What an object is capable of doing

6/24/2013

SS ZG514 Object Oriented Analysis and Design

22

Component:

A non-trivial, nearly independent and replaceable part of a system that fulfills a clear function in the context of a well defined architecture. A component may be

A source code component A run time component An executable component

6/24/2013

SS ZG514 Object Oriented Analysis and Design

23

Package:

A package is a general purpose mechanism for organizing elements into groups. A model element which can contain other model elements.
A component may be

A source code component A run time component An executable component

6/24/2013

SS ZG514 Object Oriented Analysis and Design

24

Strengths of Object Orientation: Facilitates architectural and code reuse Models more closely reflect the real world

More accurately describe corporate data and processes Decomposed based on natural partitioning Easier to understand and maintain

Stability

A small change in requirements does not mean massive changes in the system under development
SS ZG514 Object Oriented Analysis and Design 25

6/24/2013

Summary:

The basic principles of object orientation The basic concepts of object orientation The strengths of object orientation.

6/24/2013

SS ZG514 Object Oriented Analysis and Design

26

Das könnte Ihnen auch gefallen