Engineering Quality Software

Download Report

Transcript Engineering Quality Software

SYST39409 - Object Oriented Methodologies
OBJECT ORIENTED
METHODOLOGIES
J.N.Kotuba
Week02
1
Agenda
2

Assignment No 1 posted




Review details
SLATE-Weekly Topical Outline and Schedule modified
Recap last lesson
Learning outcomes for today
 Develop
the requirements model & the Unified
Process
 Use cases
 Use case diagrams
 Use case narratives
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Last Class
3


Introduced Unified Modeling Language (UML)
Discussed
Models
 Tools
 Techniques

SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Context Diagram –Pharmacy System
4
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Objectives for today
5





Explain the difference between the Waterfall SDLC
and the unified process
Learn how to use the Event Table Technique to
identify use cases
Learn how to construct a use case diagram
Learn how to build a use case narrative for each
use case and why the narratives are important
Be able to explain the difference between the
system boundary and the automation boundary
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
The Unified Process
6

Four key stages.
 Inception.
 Elaboration
 Construction
 Transition
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Unified Process:Inception
7



Go ahead on project.
Scope determined.
Business case developed for project.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Unified Process: Elaboration
8



Basic architecture of the system developed.
Construction plan is approved.
Risks are identified.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Unified Process: Construction.
9


Iterative approach to developing software.
Product will be a beta.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Unified Process:Transition
10

Beta product is introduced to users and information
is collected from users during roll-out.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Disciplined Agile Development (DAD)
Inception
11
Construction
SYST39409 - Object Oriented Methodologies
Transition
J.N.Kotuba
Iterative Development
12
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Modeling
13


Software development is the production of
‘executable models’.
These models often are abstractions of the original
problem with classes added to solve the user’s
problems.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Different Types of Models
14



Use Case Model. The system from the users point of
view.
Static Model. The elements of the system and how
they relate to one another.
Dynamic Model. Outlines the behaviour of the
system in the context of Object interactions.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
UML
15



The Unified Modeling language is (UML) a
language for development object-oriented models
and system designs.
It provides a complete set of graphical diagrams to
specify use cases, class diagrams and the dynamic
model (object interactions) of a system.
Can be used with different programming
languages.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
System Boundary vs Automation Boundary [1]
16
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
System Boundary vs Automation Boundary [2]
17
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Use Case Model (Static Model)

A use case is a script:


A step-by-step description
of how a user might make
use of the system to do a
task
It is a “case of the usage
of the system.”
18
Agenda
•
Identify all use cases
–
–
–
–
•
•
•
•
User Stories Technique
User Goal Technique
Event Decomposition Technique
CRUD Technique
Build Use Case Diagram(s)
Document use cases using narratives and activity
diagrams
Identify security concerns and requirements
Define Operational and Executive reports (Covered next
week by Special Guest Speaker)
19
Learning Objectives







Explain why identifying use cases is the key to defining
functional requirements
Describe the techniques for identifying use cases
Apply the user goal technique to identify use cases
Apply the event decomposition technique to identify use cases
Apply the CRUD technique to validate and refine the list of use
cases
Describe the notation and purpose for the use case diagram
Draw use case diagrams by actor and by subsystem
20
Use Cases




Use case— an activity that the system performs,
usually in response to a request by a user
Use cases define functional requirements
Analysts decompose the system into a set of use cases
(functional decomposition)
Two techniques for Identifying use cases
User goal technique
 Event decomposition technique


Name each use case using Verb-Noun
21
User Goal Technique





This technique is the most common in industry
Simple and effective
Identify all of the potential categories of users of the
system
Interview and ask them to describe the tasks the
computer can help them with
Probe further to refine the tasks into specific user
goals, “I need to Ship items, Track a shipment, Create a
return”
22
User Goal Technique
Some RMO CSMS Users and Goals
23
User Goal Technique:
Specific Steps
1.
2.
3.
4.
Identify all the potential users for the new system
Classify the potential users in terms of their functional
role (e.g., shipping, marketing, sales)
Further classify potential users by organizational level
(e.g., operational, management, executive)
For each type of user, interview them to find a list of
specific goals they will have when using the new
system (current goals and innovative functions to add
value)
24
User Goal Technique
Specific Steps (continued)
5.
6.
7.
8.
Create a list of preliminary use cases organized by
type of user
Look for duplicates with similar use case names and
resolve inconsistencies
Identify where different types of users need the
same use cases
Review the completed list with each type of user and
then with interested stakeholders
25
User Story Format
(one two sentences)
26
User Story-Example
(focus on one particular user for one particular goal for one
particular reason)
27
Another Example…
28
User Stories
(Focus is on intention, one need, no exceptions or
alternate paths etc.,)
29
User Stories vs Use Cases
30
Use Case Diagrams




Use case diagram— a UML model used to graphically
show uses cases and their relationships to actors
Recall UML is Unified Modeling Language, the
standard for diagrams and terminology for developing
information systems
Actor is the UML name for a end user
Automation boundary— the boundary between the
computerized portion of the application and the users
who operate the application
31
Using a context diagram to help with identifying use cases- Example
32
Event Decomposition Technique
More Comprehensive and Complete Technique




Identify the events that occur to which the system must
respond.
For each event, name a use case (verb-noun) that describes
what the system does when the event occurs
Event– something that occurs at a specific time and
place, can be described, and should be remembered
by the system
33
Discovering Use Cases
34

Event – in the real world
Event occurs when something happens


Events drive or trigger all processing that a system does.
 What events occur that will affect the system being studied?
 What events occur that will require the system to respond in some
way?
Black Box view – focus on “what” not “how”
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Event Decomposition Technique




Event – an occurrence at a specific time and place
and which needs to be remembered
Business events trigger elementary business processes
(EBPs)
EBPs are at correct level of analysis for use cases
Identify business events to decompose system into
activities/use cases
35
Types of Events

External
 Outside
system
 Initiated by external agent or actor

Temporal
 Occur
as result of reaching a point in time
 Based on system deadlines

State
 Something
inside system triggers processing need
36
Events – (affecting a system)
External event checklist
38
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Temporal Event Checklist
39
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Listing events
40


When analyzing a system we must list all events
Identify other information about each of them
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Identifying Events

Can be difficult to determine

Often confused with conditions and responses

May be useful to trace a transaction’s life cycle

Certain events left to design phase
 System
controls to protect system integrity
 Perfect
technology assumption defers events
41
Sequence of Actions that Lead Up to Only One Event
Affecting the System
42
Sequence of “Transactions”
for One Specific Customer
Resulting in Many Events
43
Events Deferred Until the Design
Phase
44
Event table
“Process”  Use Case
45
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Event Table Exercise- Pharmacy System
46
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
47
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Use Case Diagrams
Symbols
48
Use Case Identifies What Users Want
49

Write a narrative description
 Sequence
 Focus


of events or steps user goes through.
on mainline
Straight-line sequence
Then consider exceptions, options errors
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Use Cases
50

Analysts define use cases at three levels
 Brief
 Intermediate
 Fully
developed
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Use Case Narrative:
Fill Prescription
51
Step 1.Pharmacist inputs Patient ID
Step 2.System displays patient medical record
Step 3.Pharmacist verifies dosage, potential allergic reactions and/or interaction with
other medications.
Step 4.The Pharmacist fills the prescription and updates the patient’s medical record on
the system with details of the new prescription.
Step 5. The system prints a label which is sent to the nurses station and the Billing Dept.
is given Patient and Prescription details.
Alt Step 3. If the pharmacist determines a possible negative condition exists, then the
Doctor is contacted
Alt Step 4. The prescription is held for disposition and the process terminates with the
pharmacist proceeding to the next prescription in the queue.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Brief Description of Create New Order Use Case
52
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Intermediate Description of Telephone Order Scenario for Create New
Order Use Case
53
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Fully Developed Description of Telephone Order Scenario for Create New Order
Use Case
54
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Use Case Narratives- Preconditions & Post
Conditions
55

Hospital Pharmacy Case Study
SYST39409-Object Oriented Methodologies
© Jerry Kotuba
Example
“Review
Prescription”
Use Case
Fully Developed
Package:
Pharmacy System
Use Case Name:
Review Prescription
Primary Actor:
Pharmacy Technician
Other Participating Actors:
Summary Description:
When prescriptions are received at the Mercy Hospital Pharmacy, they are directed to the
Pharmacy Technician. He reviews the prescription and then decides, based on the type of
medication, which of three stations to direct it to for filling.
Preconditions:
The prescription must be for a current patient of Mercy Hospital and issued by a licensed
Medical Doctor.
Trigger:
Prescription is received by the pharmacy.
Typical Course of events:
1.
2.
3.
4.
5.
Pharmacy Technician (PT) verifies that the patient is an admitted patient.
PT verifies that a licensed Medical Doctor issued the prescription.
PT logs the prescription into the system and it is assigned a serialized ID number by the
system.
PT checks the type of medication; if it must be formulated (made-on-site), sends it to the
lab station; if it is an off-the-shelf medication, sends it to the shelving station; narcotics
are sent to the secure station.
PT enters the shelving station ID to which it was sent into the system.
Alternative Paths:
If the patient is not currently admitted to the Hospital, the prescription is returned to the Doctor.
If the Doctor is not listed in the Pharmacy database, the prescription is referred to the
Pharmacist for disposition.
Post conditions:
The prescription is assigned to a filling station and logged into the system for tracking.
Assumptions:
Related Business Rules:
56
Author:
Date:
Prescriptions can only be accepted from licensed Physicians for patients admitted to Mercy
Hospital.
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
May 2012
J.N.Kotuba
Use Case Narrative:
57

Do’s



Use complete sentences
How is the use case
initiated and how does
it end
What the initial and
final actions and state
of the system look like

Don’ts

SYST39409 - Object Oriented Methodologies
Use abbreviations or
sentence fragments
J.N.Kotuba
58
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Components of the Use Case Diagram
59



Use Case
Actor
System Boundary
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Draw the Use Case with Visio
60
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Your Turn…
61


See SLATE – I-C-E-01
Use Case For the Dental Office Appointment
System, develop;
 Context
Diagram
 Event table
 Use Case Diagram
 Create a narrative for each use case (Intermediate Level)
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
Recap Lesson
62

Learning outcomes for today
 Develop
the requirements model
 Use cases
 Use case diagrams
 Use case narratives
SYST39409 - Object Oriented Methodologies
J.N.Kotuba
What Comes Next?
63
SYST39409 - Object Oriented Methodologies
J.N.Kotuba