Unit 1
Unit 1
ORIENTED ANALYSIS
AND DESIGN
Syllabus
OBJECTIVES:
• To understand the Object-based view of Systems and develop robust object-
based models for Systems
Syllabus
UNIT I OOAD BASICS
Introduction - Overview of Object-Oriented system development - Object Basics – OO Themes – Evidence for the usefulness of OO Development – OO
Modeling – Unified Process -Inception – Use case Modeling - Relating Use cases – include, extend and generalization. Case Study: The Next Gen POS system,
The Monopoly Game system
• analyzing,
System development refers to all activities that go into producing information system solution.
• modelling,
• design,
• implementation,
Two Approaches,
Traditional Approach
Objected-Oriented Approach
TRADITIONAL APPROACH
Faster development,
Reusability,
Increased quality
modeling the real world and provides us with the stronger equivalence of the
real world‘s entities (objects).
• Changing requirements
• Easier to maintain
• More robust
• Code reuse
OBJECT BASICS
Goals:
A window object is responsible for things like opening, sizing, and closing
itself.
A chart object is responsible for things like maintaining data and labels even
for drawing itself.
OBJECT BASICS
EXAMPLES OF OBJECT ORIENTED SYSTEMS
A window object is responsible for things like opening, sizing, and closing
itself.
A chart object is responsible for things like maintaining data and labels even
for drawing itself.
OBJECT BASICS
WHAT IS AN OBJECT?
Object is an instance of a class.
The role of a class is to define the attributes and methods (the state and
behaviour) of its instances.
The class car, for example, defines the property color. Each individual car
(object) will have a value for this property, such as "maroon," "yellow" or
"white."
OBJECT BASICS
Polymorphism
//
//
}
OBJECT BASICS
Inheritance
Classes can share, obtain or “inherit” properties and methods that belong to existing classes.
String name;
String color;
void pollination() {
}
OBJECT BASICS
Data Abstraction
Data abstraction refers to the process of only displaying relevant properties
and methods to handle an object, while hiding the rest
Once a class has been declared as abstract, however, it cannot be instantiated.
}
OBJECT BASICS
Encapsulation
• Encapsulation refers to keeping objects with their methods in one place.
}
Unified Process
Unified Process (UP)
• The Unified Process is a popular iterative software development process for
building object oriented system.
• Iterative and evolutionary development involves relatively early programming and
testing of a partial system, in repeated cycles.
• It typically also means that development starts before the exact software
requirements have been specified in detail;
• Feedback (based on measurement) is used to clarify, correct and improve the
evolving specification
• Rational Unified Process (RUP) – Detailed Refinement of unified process
FOUR PHASES OF UNIFIED PROCESS
• Inception
• Elaboration
• Construction
• Transition
FOUR PHASES OF UNIFIED PROCESS
• Inception
Refined vision, iterative implementation of the core architecture, resolution of high risks,
identification of most requirements and scope, more realistic estimates.
• Construction
Iterative implementation of the remaining lower risk and easier elements, and preparation for
deployment.
• Transition
Implementation means programming and building the system, not deploying it.
Define risk mitigation strategy, develop an initial project plan and identify known cost,
schedule, and profitability trade-offs.
• The plan approved by the project management, and funding authority, and the
resources required for the elaboration phase have been allocated.
Elaboration - Activities
• Define the architecture.
Project plan is defined. The process, infrastructure and development environment are
described.
To provide a stable basis for the bulk of the design and implementation effort in the
construction phase.
Elaboration - Exit criteria
• A detailed software development plan, with an updated risk assessment, a management plan, a
staffing plan, a phase plan showing the number and contents of the iteration , an iteration plan,
and a test plan
• A baseline vision, in the form of a set of evaluation criteria for the final product
• A domain analysis model, sufficient to be able to call the corresponding architecture ‘complete’.
Construction - Entry criteria
• The product and artifacts of the previous iteration. The iteration plan must
state the iteration specific goals
• Objective measurable evaluation criteria for assessing the results of the next
iterations.
Transition - Entry criteria
The standard is created and managed by, the Object Management Group.
systems.
GOALS OF UML
To provide ready to use and expensive visual modeling language for
developing the effective system model.
Collaboration diagram
Activity diagram
Component diagram
Deployment diagram
CASE STUDY – THE NEXTGEN POS SYSTEM
The NextGen point-of-sale (POS) system
What is Inception?
Inception: An Analogy
Understanding Requirements
Types of Requirements
INCEPTION
Introduction
Inception is the initial short step to establish a common vision and basic
scope of the project.
It will include
Analysis of 10% use cases.
Analysis of non functional requirements.
Creation of a business case.
Preparation of the development environment.
INCEPTION
Introduction
Determine if it is feasible.
Packaging
Use cases are a widely used mechanism to discover and record requirements.
We will discuss
how to write use cases and draw a UML use case diagram.
To capture these goals and system requirements - customers and end users—
to contribute to their definition or evaluation.
Example
Process Sale:
A customer arrives at a checkout with items to purchase. The
cashier uses the POS system to record each purchased item. The
system presents a running total and line-item details. The
customer enters payment information, which the system
validates and records. The system updates inventory. The
customer receives a receipt from the system and then leaves with
the items.
Definitions : What are Actors, Scenarios, and Usecases?
Actor :
Scenario :
For example, the scenario of successfully purchasing items with cash, or the
scenario of failing to purchase items because of a credit card transaction
denial.
use case
UML defines a use case diagram to illustrate the names of use cases and
actors, and their relationships.
WHY USE CASES
Simple
Familiar
Use cases are requirements (although not all requirements). Some think of
requirements only as "the system shall do..."
Actors
An actor is anything with behavior, including the system under discussion
(SuD) itself when it calls upon the services of other systems.
Actors are not only roles played by people, but organizations, software, and
machines.
Primary actor
Supporting actor
Offstage actor
Actors
Primary actor
Supporting actor
Offstage actor
- has an interest in the behavior of the use case, but is not primary or supporting
- they do not describe the internal workings of the system, its components, or
design.
how it will do it
Black-box style Not
Example
The system writes the sale to a
The system records the database. ...or (even worse):
sale. The system generates a SQL INSERT
statement for the sale...
Use Case Types and Formats
Use cases are written in different formats, depending on need.
Brief
casual
fully dressed
- the most elaborate. All steps and variations are written in detail, and there are supporting
sections, such as preconditions and success guarantees.
Fully Dressed Example
The Two-Column Variation
Some prefer the two-column or conversational format, which emphasizes the
fact that there is an interaction going on between the actors and the system.
Finding Primary Actors,
Goals, and Use Cases
Finding Primary Actors, Goals, and Use Cases
Use cases are defined to satisfy the user goals of the primary actors.
- Example - For this case study, the POS system itself is the system under
design.
- Once the external actors are identified, the boundary becomes clearer.
Finding Primary Actors, Goals, and Use Cases
Steps 2 and 3: Finding Primary Actors and Goals
- To find primary actors and goals then set up the framework for further investigation
- primary actors and user goals, the following questions help identify others.
Who starts and stops the system? Who does user and security
management?
Is there a monitoring process that restarts the system if it fails? How are software updates
handled?
Is "time" an actor because the system does something in response to a time event?
Who evaluates system activity or performance? Who evaluates logs? Are they remotely
retrieved?
Finding Primary Actors, Goals, and Use Cases
- (2) Primary and Supporting Actors
- primary actors have user goals fulfilled through using services of the
system.
- Why is the cashier, and not the customer, the primary actor in the use case
Process Sale?
Finding Primary Actors, Goals, and Use Cases
Step 4: Define Use Cases
Name the use case similar to the user goal and Also, name use cases starting
with a verb.
Your boss asks, "What have you been doing all day?"
A use case typically contains many steps, and in the fully dressed format will
often require 310 pages of text.
Use case diagrams model the functionality of a system using actors and use
cases.
Problem Statement
- Customer
- Bank
- ATM Technician
- ATM Operator
Example ATM Machine
Define Use cases
- Check Balances
- Deposit Funds
- Withdraw Cash
- Transfer Funds
- Maintenance
- Repair
- Refill
Example ATM Machine
UC1 - Check Balances
Extension
For example, a sub function use case such as Handle Credit Payment may be
part of several regular use cases, such as Process Sale and Process Rental.
Include
Exclude
Generalization
Relating Use cases – Include Relationship
This is the most common and important relationship.
When ever the base use case happen then sub use case is also must happen.
<<include>>
Base Use case Sub Use case
Relating Use cases – Include Relationship
For example: UC1:
Process Sale
Main Success Scenario:
1 . Customer arrives at a POS checkout with goods and/or services to purchase.
7. Customer pays and System handles payment.
Extensions:
7b. Paying by credit: Include Handle Credit Payment. 7c. Paying by check:
Include Handle Check Pavment.
Relating Use cases – Include Relationship
For example: UC7: Process Rental
Extensions:
6b. Paying by credit: Include Handle Credit Payment
Handle cash
payment
Relating Use cases – Include Relationship
Summary
A concrete use case is initiated by an actor and performs the entire behavior
desired by the actor.
An abstract use case is never instantiated by itself; it is a sub function use case that is part
of another use case.
Extension points are labels in the base use case which the extending use case
references as the point of extension
Relating Use cases – Extend Relationship
<<extend>>
Base Use case Sub Use case
Relating Use cases – Extend Relationship
Relating Use cases
Sneeze
<<extend>>
Say Excuse me
Relating Use cases – Generalization
Generalization is the activity of identifying commonality among concepts
and defining super class (general concept) and subclass (specialized concept)
relationships.
Define and Explain UPM with its phase for developing the above online
baking company.
Ordering food in a restaurant
Identify Actors.
Ordering food in a restaurant
Identify Use case.
Ordering food in a restaurant
Write use case modelling choose any use case write fully dressed format
UC1 -
Scope –
Level –
Primary Actor –
Precondition
Success Guarantee –
Extension
Ordering food in a restaurant
Draw Use case Diagram
Monopoly Game
• Text for this use case is very different than the NextGen POS problem, as it is a simple simulation.
– Game rules are captured in another document, rather than in the use case.
• Use Case UC1: Play Monopoly Game
• Scope: Monopoly application
• Level: user goal Primary
• Actor: Observer
• Stakeholders and Interests: - Observer: Wants to easily observe the output of the game
simulation.
• Main Success Scenario:
• 1. Observer requests new game initialization, enters number of players.
• 2. Observer starts play.
• 3. System displays game trace for next player move
Repeat step 3 until a winner or Observer cancels.
Extensions
At any time , system fails
(to support recovery, system logs after each completed move)
1. observer restarts system
2. system detects prior failure, reconstructs state and promotes to
continue
3. observer chooses to continue
Special Requirements
provide both graphical and text trace modes