You are on page 1of 25

Introduction

to OOAD
Week 1
Analysis & Design
• Analysis
• Investigation of problem and requirements, rather than a solution.
• E.g. Requirements analysis and OO analysis.

• Design
• It emphasizes on conceptual solution that fulfills the requirements.
• E.g. Database design or OO design
• Implementation expresses the true and complete realized design
Object Oriented (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
• Contains checks to help eliminate errors
• Facilitates reuse of designs and code
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 the objects or concepts in the
problem domain.
• Class: A class is a template for objects. ... A class also describes object
behavior. 
• Object: is an element (or instance) of a class
• Example: Hospital Management System (Doctor, Patient, Treatment, etc.)
Object Oriented Design (OOD)
• Emphasis is on defining software objects, and how they collaborate
to fulfill system requirements.
• Examples:
• Doctor object may have a name attribute and prescribeMedicine( ) method
• Patient object may have PatientID attribute and payBill() method.
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)
Another Example- 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.
Example - contd.
Book
domain concept visualization of
title domain concept

public class Book


{
representation in an private String title;
object-oriented
programming language public Chapter getChapter(int) {...}
}
Flight Information System
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 OO terms - requirements analysis; represent the business
processes in textual narration (Use Cases).
• Identifying and recording the business processes as use cases is not
actually an object oriented activity; though a necessary first step.
Roles in the organization
 Identify the roles of people (most common), organizations, other
software and machines who will be involved in the business
processes
 In OO terms - domain analysis
 Examples - customer, library assistant, navigator, sensor, etc.
Who does what? Collaboration
• 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
In Summary...
Simple example to see big picture
• Define use cases
• Define domain model/conceptual model
• Define interaction diagrams
• Define design class diagrams

Define domain Define Define design


Define use Interaction
cases model class diagrams
diagrams
Short Example
• Dice game
• A software simulates a player rolling two dice. If the total is seven, they win;
otherwise, they lose.
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.
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
Conceptual model - dice game
Player Die
1 Rolls 2
name faceValue
1 2
Plays
1

DiceGame
1 Includes

Conceptual model is not a description of the software components;


it represents concepts in the real world problem domain
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/Collaboration Diagram
Example – Sequence Diagram
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
Example - Class diagram
Defining Models and Artifacts
• Models provide a mechanism for decomposition and expressing
specifications
• Objectives
• analysis and design models
• familiarize UML notations and diagrams
• Real world software systems are inherently complex
Analysis and Design models
• Analysis model - models related to an investigation of the domain
and problem space (Use case model qualifies as an example)
• Design model - models related to the solution (class diagrams
qualifies as an example)
Thanks

You might also like