CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
1Introduction to OOAD
1. Introduction to OOAD
Lecture # 1
Ms. Shazia Yousaf
Lecturer, Department of computer science,
University of Sargodha Mandi Bahauddin Campus
2. OO Objectives
We want a development method which:
Is able to guide us through analysis, design,
and implementation using one consistent
paradigm throughout those phases
Is less likely to generate errors
Facilitates reuse of designs and code
3. Analysis & Design
Analysis
Investigation of problem and requirements,
rather than a solution.
E.g. Requirements analysis and OO analysis.
Design
It emphasizes a conceptual solution that fulfills
the requirements.
E.g. Database design or OO design
Implementation expresses the true and complete
realized design
4. Object Oriented Analysis (OOA)
OOA is “a method of analysis that
examines requirements from the
perspectives of the classes and objects.”
(Booch 1995)
Emphasis is on finding and describing
conceptual objects in the problem
domain.
5. Object Oriented Design (OOD)
OOD is “a method of design
encompassing the process of OO
decomposition and a notation for depicting
both logical and physical as well as static
and dynamic models of the system.”
(Booch 1995)
Emphasis is on defining software
objects, and how they collaborate to fulfill
system requirements
6. What is OO analysis and design?
Essence of OO analysis - consider a
problem domain from the perspective of
objects (real world things, concepts)
Essence of OO design - define the
solution as a collection of software
objects (allocating responsibilities to
objects)
7. Examples- Library IS
OO Analysis - in the case of the library
information systems, one would find
concepts like book, library, patron
OO Design - emphasis on defining the
software objects; ultimately these objects
are implemented in some programming
language; Book may have a method
named print.
8. Example - contd.
Book
title
public class Book
{
private String title;
public ChaptergetChapter(int){...}
}
domain concept visualization of
domain concept
representation in an
object-oriented
programming language
9. Flight IS
Plane
tailNumber
public class Plane
{
private String tailNumber;
public List getFlightHistory() {...}
}
domain concept
visualization of
domain concept
representation in an
object-oriented
programming language
10. What are the business processes?
First step - consider what the business
must do; in the case of a library - lending
books, keeping track of due dates, buying
new books.
In requirements analysis; represent the
business processes in textual narration
(Use Cases).
11. Business processes - contd.
Identifying and recording the business
processes as use cases is not actually
an object oriented activity; though a
necessary first step.
12. Roles in the organization
Identify the roles of people who will be
involved in the business processes
In OO terms - domain analysis
Examples - customer, library assistant,
programmer, navigator, sensor, etc.
13. Who does what?
Business processes and roles (actors);
time to determine how to fulfill the
processes and who does these processes
in OO terms - object oriented design;
assigning responsibilities to the various
software objects
often expressed in class diagrams
14. In Summary...
Business
Analogy
OO Analysis
and Design
Associated
Documents
What are the
business
processes?
Requirements
analysis
Use cases
What are
employee roles?
Domain analysis Conceptual
model
Who is
responsible for
what?
Responsibility
assignment;
Design class
diagrams
15. Simple example to see big picture
Define use cases
Define domain model
Define interaction diagrams
Define design class diagrams
Define domain
model
Define
Interaction
diagrams
Define design
class diagrams
Define use
cases
16. Short Example
Dice game
A software simulates a player rolling two dice. If
the total is seven, they win; otherwise, they
lose.
17. Define use cases
Use cases
Narrative descriptions of domain processes in a
structured prose format
They are stories or scenarios of how people use
the system
Use case: Play a game
Actors: Player
Description: Player requests to roll the dice. System
presents results: If the dice face value totals seven,
player wins; otherwise, player loses.
18. Define conceptual model
OO Analysis concerns
specification of the problem domain
identification of concepts (objects)
Decomposition of the problem domain
includes
identification of objects, attributes, associations
results can be expressed in conceptual
model
19. Conceptual model - dice game
Conceptual model is not a description of the software components;
it represents concepts in the real world problem domain
Player
name
DiceGame
Die
faceValue
Rolls
Plays
Includes
2
2
1
1
1
1
20. Defining Interaction diagram
OO Design is concerned with
defining software objects – their responsibilities and
collaborations
Essential step - allocating responsibility to
objects and illustrating how they interact with
other objects
Expressed as interaction diagrams
Sequence Diagrams
Communication Diagrams
22. Defining class diagrams
Key questions to ask
How do objects connect to other objects?
What are the behaviors (methods) of these objects?
interaction diagrams suggests connections; to support
these connections methods are needed
Expressed as class diagrams
23. Example - Class diagram
2
Die
faceValue :int
getFaceValue():int
roll()
DiceGame
die1 :Die
die2 :Die
play()
1