Professional Documents
Culture Documents
Object Oriented Analysis and Design
Object Oriented Analysis and Design
Object Oriented Analysis and Design
and Design
OBJECT ORIENTED ANALYSIS
UML
• The Unified Modeling Language (UML) is a
language for specifying, visualizing, constructing,
and documenting the artifacts of software
systems, as well as for business modeling and
other non-software systems
Basics
Define
Define Define Define
interactio
use domain class
n
cases model diagrams
diagrams
Define Use Cases
• Use cases are not an object-oriented artifact
– they are simply written stories.
• For example:
– Play a Dice Game: A player picks up and rolls the
dice. If the dice face value total seven, they win;
otherwise, they lose
Use Cases
• What is a Use Case
A formal way of representing how a
business system interacts with its
environment
Illustrates the activities that are performed
by the users of the system
A scenario-based technique in the UML
A sequence of actions a system performs that
yields a valuable result for a particular actor.
Use Case Analysis
• What is an Actor?
– A user or outside system that interacts
with the system being designed in order
to obtain some value from that interaction
• Use Cases describe scenarios that describe
the interaction between users of the system
(the actor) and the system itself.
Use Cases
• Use case diagrams describe what a system does
from the standpoint of an external observer. The
emphasis is on what a system does rather than how.
Make
Appointment
Use Case - Actor
• Labelled using a descriptive noun or
phrase
• Represented by a stick character
Use Case - Relationships
• Relationships
– Represent communication between actor and
use case
– Depicted by line or double-headed arrow line
– Also called association relationship
Make
Appointment
Use Case Diagram
• Other Types of Relationships for Use
Cases
– Generalization
– Include
– Extend
Components of Use Case Diagram
• Generalization Relationship
– Represented by a line and a hollow arrow
• From child to parent
• Include Relationship
– Represents the inclusion of the functionality of
one use case within another
– Arrow is drawn from the base use case to the
used use case
– Write << include >> above arrowhead line
Use Case Diagram
• Extend relationship
– Represents the extension of the use
case to include optional functionality
– Arrow is drawn from the extension use
case to the base use case
– Write << extend >> above arrowhead
line
Use Case - Relationships
• Boundary
– A boundary rectangle is placed around the
perimeter of the system to show how the actor
communicate with the system.
Make
Appointment
Example of Relationships
Use Cases for Library System
Use Case Relationships
• Pro:
– Reduces redundancy in use cases
– Reduces complexity within a use case
• Con
– May introduce complexity to use case
diagram
Example
Altered State University (ASU) Registration System
1. Professors indicate which courses they will teach on -line.
2. A course catalog can be printed
3. Allow students to select on- line four courses for upcoming
semester.
4. No course may have more than 10 students or less than
3 students.
5. When the registration is completed, the system sends
information to the billing system.
6. Professors can obtain course rosters on - line.
7. Students can add or drop classes on - line.
31
Read the case study given below and perform the following tasks.
Identify:
Actors of the system and Use Cases that appears as verbs
Use Include and Extend relationship where needed
Draw a complete Use Case diagram of the system
Your customer is tired of his employees who keep coming late from coffee brakes
because it takes them ages to prepare and drink their coffee and to clean their
equipment afterwards.
He asks you to design the prototype of a new revolutionary coffee machine that
is both appealing to the eye and yet easy enough to handle even for an IT-
specialist. During a brainstorming session on functional requirements, among the
first use cases that are brought up there are things like prepare, serve, and
cleanUp. While appearing simple at first glance, it soon turns out that the design
must pay attention to a lot of details, so for each of the above mentioned use
cases there will probably be several included use cases like insertCoffee, or
addMilk. Also bear in mind that the coffee machine needs to be refilled,
maintained. There might be power brakes or problems with the water supply. Try
to cover as many boundary conditions as possible to ensure the office keeps
running.
Your diagram should contain examples of generalization, <<includes>> and
<<extends>> relations.
Tasks
Establish <<Include>> and <<Extend>> Relationships:
• Consider a Shop Sales System. A sales officer uses the
system to process / record requests of both customer
order and faulty goods return. Both processes will need to
identify the customer first.
• Consider an online selling / buying website. The website
requires the seller and buyer to register their bank account
information. A separate process will be called if the bank
account is suspended / unavailable / illegitimate
• Bank ATM Use Cases
• An automated teller machine (ATM) or the automatic banking machine
(ABM) is banking subsystem (subject) that provides bank customers
with access to financial transactions in a public space without the need
for a cashier, clerk or bank teller.
• Customer (actor) uses bank ATM to check balances of his/her bank
accounts, deposit funds, withdraw cash and/or transfer funds (
use cases). ATM Technician provides maintenance and repairs. All
these use cases also involve Bank actor whether it is related to customer
transactions or to the ATM servicing.
• On most bank ATMs, the customer is authenticated by inserting a plastic
ATM card and entering a personal identification number (PIN). Customer
Authentication use case is required for every ATM transaction.