You are on page 1of 29

COIT 415

Assoc. Prof. Dr. Waleed Ali


Department of Information Technology
Faculty of Computing and Information Technology in
Rabigh
King Abdulaziz Universit
COIT 415- OO Analysis & Design
Second Semester 1443 AH
Title: Object-Oriented Analysis and Design (COIT 415)
Lecturer: Assoc. Prof. Dr. Waleed Ali
Mobile: 0563887947
Email: waabdullah@kau.edu.sa , waleedalodini@gmail.com
Room: 102
Time: Sun/Tue/Thu (09:00-09:50 AM)
COIT 415- OO Analysis & Design
Text books:
Dennis, Alan, Barbara Wixom, and David Tegarden. Systems
analysis and design: An object-oriented approach with UML, 6th
Edition. John wiley & sons, 2020. ISBN: 978-1-119-56121-7
Schaum’s Outline of UML, 2nd Edition, Simon Bennett, John Skelton,
Ken Lunn, McGraw-Hill, 2001, ISBN 978-0077107413

Other References:
Using UML: Software Engineering with Objects and Components, 2nd
Edition, Perdita Stevens, Addison-Wesley, 2000, ISBN 978-0321269676

The Object-Oriented Approach: Concepts, System Development, and


Modeling with UML, John Satzinger, Tore Orvik, Course Technology,
2001, ISBN 978-0619033903
Course Objectives

To introduce the concept of Object-oriented analysis


and design
To be familiar with problems of complex systems,
evolution of object-oriented model, class, object-
oriented methodology and it notations
To provide with applications, case studies and CASE
tools

CASE = Computer Aided Software Engineering


Course Outline
Chapter 1: Introduction to O. O. Analysis and Design

Foundations and Definitions: OOP, OOA and


OOD
Object-orientation representation of objects
Object-oriented approach
Major elements of Object Model
 Abstraction
 Encapsulation
 Modularity
 Hierarchy
Object Oriented Programming(OOP)
OOP is a method of implementation in which programs are
organized as cooperative collection of objects each of which
represents an instance of some classes are all members of a
hierarchy of classes united via inheritance relationships.

OOP can be called as a new programming paradigm that will


help us develop software that is more reliable, easily
maintainable and reusable
The three fundamental units of OOP are objects, methods
and messages
Object Oriented Programming(OOP)

Object-Oriented (OO) development is very


different from structured development:

Structured approach focuses on major


functions within a system and on the data used
by the functions.
OOP approach focuses on the objects in a
system and on the relationships between those
objects.
What is Analysis and Design?
Analysis emphasizes an investigation of the problem
and requirements, rather than a solution.
 “What” questions

Design emphasizes a conceptual solution (in software


and hardware) that fulfills the requirements, rather
than its implementation. 
“How” questions
For example, a description of a database schema and
software objects.
Object Oriented Analysis(OOA)
OOA is a method of analysis that examines
requirements from the perspective of the classes
and objects found for the problem domain.

For example, in a library information system, we


will find objects such as Books, Authors and
Borrowers
Object Oriented Design (OOD)
Object-Oriented Design (OOD) is a method of
design encompassing the process of Object-oriented
decomposition and a notation for depicting both
logical and physical as well as static and dynamic
models of the system under design

 OOD leads to an object–oriented decomposition


and uses different notations to express different
models.
OOA and OOD
The essence of Object-oriented Analysis and Design is
to emphasize considering a problem domain and logical
solution from the perspective of objects
Analysis Design construction

Investigation of Logical Code


the problem solution

Figure : Meaning of development activities

During OOA, there is an emphasis on finding and


describing the objects or concepts in the problem
domain.
During OOD, there is an emphasis on defining logical
software Objects that will ultimately be implemented in
an Object-oriented programming language.
These software objects have attributes and methods
Major elements of Object Model
Abstraction
Encapsulation
OO Principles
Modularity
Hierarchy
What is an Object?
Informally, an object represents an entity, either physical,
conceptual, or software.

 Physical entity
Chemical Process Truck

 Conceptual entity (Section, Trip, …)

 Software entity

Linked List
A More Formal Definition
Attributes

An object is an entity with a


well-defined boundary and
identity that encapsulates state
and behavior.
State is represented by
attributes and relationships.
Behavior is represented by the
object’s methods. Object
Operations
An Object Has Identity
Each object has a unique identity, even if the state
is identical to that of another object.

Professor “Mohammad Professor “Mariam Ahmad”


Siddeek” teaches Java teaches Java
Abstraction
An abstraction denotes the essential characteristics of an
object that distinguishes it from all other kinds of objects
Abstraction is one of the fundamental ways that we, as humans,
cope with complexity
A good abstraction is one that emphasizes details that are
significant and ignores details that are, at least for the
moment, not important or diversionary
Abstraction focuses on the outside view of an object, and so
serves to separate an object’s essential behavior from its
implementation
Deciding upon the right set of abstractions for a given domain is
the central problem in object-oriented design
What is Encapsulation?
Hide implementation from clients
Clients depend on interface

Security and Improves


Resiliency
Encapsulation
Encapsulation is the process of compartmentalizing the
elements of an abstraction that constitutes its structure and
behavior and serves to separate the contractual interface of an
abstraction and its implementation

Abstraction and encapsulation are complementary


concepts
Abstractions focus upon the observable behavior of an object,
whereas encapsulation focuses on the implementation; and this
is most often achieved through information hiding, which is the
process of hiding all the secrets of an object that do not
contribute to its essential characteristics
Encapsulation
For abstraction to work, implementation must be
encapsulated
In practice, this means that each class must have two
parts: an interface and an implementation
The interface of a class captures only its outside view,
encompassing abstraction of the behavior common to all
instances of the class
The implementation of a class comprises the
representation of the abstraction as well as the
mechanisms that achieve the desired behavior
A client Encapsulation separates
depends on implementation from
the interface users/clients
Encapsulation
 private attributes and methods are encapsulated within
the class, they cannot be seen by clients of the class
 public methods define the interface that the class
provides to its clients
 Constructors and public methods of a class serve
as the interface to class’s clients
Customer
- numCustomers = 0
private attributes - MIN_BUDGET = 200
- name: String
- address: String
- budget: int

public methods + printNumCustomer( ): void


+ placeOrder( ): void

Customer class
Encapsulation Illustrated
 Professor Clark Ac
ce
pt
needs to be able to

()
Co

s
ur

de
se

ra
teach four classes in O ff e

G
al
rin

in
g(
the next semester. )

i tF
Name: Michael Zheng
Name:

bm
Employee ID: 567138

Su
HireDate: 07/25/1991
Michael
Status: Tenured

Zheng

Se
SetMaxLoad(4) Discipline: Finance

tM
MaxLoad:4

ax
Employee

Lo
ad
()
TakeSabbatical()

22
Modularity
Modularization consists of dividing a program into
modules which can be compiled separately, but which
have connection with other modules
The connections between modules are the
assumptions which the modules make about each
other

Modularity breaks up
complex systems into
small, self-contained
pieces that can be
managed
independently
Modularity
The meaning of modularity as Myers observes is “the act of
partitioning a program into individual components” and
this can reduce its complexity to some degree

Although partitioning a program is that it creates a number of


well-defined, documented boundaries within the program some
languages do not provide modules, and class is the only physical
unit for decomposition

Two main principles of modularity:


1-High cohesion – Modules should contain functions that
logically belong together
2-Weak coupling –Changes to modules should not affect
other modules
Example: Modularity
For example, break complex Billing
System
systems into smaller modules.

Course
Catalog
System

Course Registration
System Student
Management
System
Modularity
Two additional technical issues can affect modularization
decisions
First, since modules usually serve as the elementary and
indivisible units of software that can be reused across
applications, a developer might choose to package classes
and objects into modules in a way that makes their reuse
convenient
Second, many compilers generate object code in segments,
one for each modules. Therefore, there may be practical
limits on the size of individual modules

26
Hierarchy
Set of abstractions forms a hierarchy and by identifying
hierarchies, we simplify the understanding of our problem
Hierarchy is a ranking or ordering of abstractions

Increasing
abstraction
Vehicle

Car

Ford

Decreasing
abstraction
Mustang Taurus Thunderbird

Elements at the same level of the hierarchy should be at the same level of abstraction
Hierarchy
Abstraction is a good thing, but in all except the work
trivial applications, we may find many more
abstractions than we can comprehend at one time
Encapsulation helps manage this complexity by
hiding the inside view of our abstractions
Modularity helps also, by giving us a way to cluster
logically related abstractions
Still, this is not enough, so ranking of abstraction
helps

28
Hierarchy
A set of abstractions often forms a hierarchy, and by
identifying these hierarchies in our design, we greatly
simplify our understanding of the problem

29

You might also like