Professional Documents
Culture Documents
Requirements Analysis-1: September 1, 2003 BITS C461/IS C341 Softwar e Engineering 1
Requirements Analysis-1: September 1, 2003 BITS C461/IS C341 Softwar e Engineering 1
September 1,
Contents
Unified Process
September 1,
Basics
UML
Actors, Use cases
What is it?
Example 1:
Example 2:
September 1,
C- and D-Requirements
September 1,
September 1,
Roadmap:
September 1,
C-requirements:
Use cases expressed individually and with a use case
diagram. A use case specifies a collection of scenarios.
September 1,
Weekly
pay
Regular
hours
Employee Record
Overtime
rate
Company records
*
Pay
Overtime
hours
Overtime
pay
Total pay
Worker
Deduct
taxes
Tax rates
September 1,
Net pay
Check
Issue
paycheck
EBON (e,f)
EBP(e,f)
September 1,
D-requirements:
Release:
September 1,
10
Non-functional requirements
Performance
The blood pressure monitor will complete a
reading within 10 seconds.
Reliability
The blood pressure monitor must have a failure
probability of less than 0.01 during the first 500
readings.
September 1,
11
September 1,
12
Traceability:
Functional requirements
D-requirement inspection report design
segment code segment code inspection
report test plan test report
Traceability:
Non-Functional requirements
(a)
Isolate each non-functional requirement.
(b)
Document each class/function with the
related non-functional requirement.
September 1,
13
Testability
It must be possible to test each requirement. Example ?
September 1,
14
Strategy :
September 1,
15
Completeness
Self contained, no omissions.
Error conditions
State what happens in case of an error. How
should the implementation react in case of an
error condition?
September 1,
16
Consistency of Requirements
September 1,
17
September 1,
18
September 1,
19
September 1,
20
Examples
September 1,
21
Example - contd.
Domain concept
Representation in
analysis of
concepts
Book
______
title
print()
Representation in
OO programming
language
September 1,
22
Digression: OO Concepts-Objects
http://java.sun.com/docs/books/tutorial/java/concepts/
September 1,
23
Digression: OO Concepts-Class
September 1,
24
September 1,
25
September 1,
26
September 1,
27
In Summary...
OO Analysis
and Design
Associated
Documents
Requirements
analysis
Use cases
September 1,
Design class
diagrams
28
September 1,
29
Use case:
Actors:
Play a game
Player
30
OO Analysis concerns
specification of the problem domain
identification of concepts (objects)
September 1,
31
Rolls
Die
____
facevalue
2
Plays
DiceGame Includes
September 1,
32
Collaboration diagram
September 1,
33
1: r1:=roll()
2: r2:= roll()
September 1,
d1:Die
d2:Die
34
September 1,
35
Die
Rolls
1
faceValue
2
roll()
Plays
DiceGame
1
includes
initialize() 1
36
September 1,
37
September 1,
38
September 1,
39
Parts of UML
September 1,
40
Views in UML
Use
Case
View
September 1,
41
Views in UML
Logical
View
Use
Case
View
September 1,
42
Views in UML
Component
View
Logical
View
Use
Case
View
September 1,
43
Views in UML
Component
View
Logical
View
Use
Case
View
Concurrency
View
44
Views in UML
Component
View
Deployment
View
Logical
View
Use
Case
View
Concurrency
View
September 1,
45
Introduction to UML[4]
Model elements
September 1,
Class
Object
State
Use case
Interface
Association
Link
Package
46
UML diagrams
September 1,
47
September 1,
48
presentation
application logic (problem domain, service
support)
persistence
September 1,
49
Analysis
Objectives
September 1,
50
Use Cases
September 1,
51
Actors [1]
Customer
September 1,
52
Actors [2]
September 1,
53
September 1,
54
September 1,
55
Cashier
Customer
Supervisor
Choosing actors:
September 1,
56
Cashier
Log In
Cash out
Customer
Buy items
Return items
September 1,
57
Common mistake
September 1,
58
September 1,
59
September 1,
60
Handle returns
Cashier
Process rental
System administrator
Manage
security
Manage users
Payment
Authorization
service
<<actor>>
Tax calculator
<<actor>>
Accounting
system
September 1,
61
September 1,
62
Exception handling
September 1,
63
September 1,
Buy Items
Customer, Cashier
A customer arrives at a checkout with
items to purchase. The cashier records
the purchase items and collects payment.
64
POST example:
September 1,
65
Requirements Analysis-2
September 1,
66
Actors
Customer, Cashier
Purpose
Overview
A customer arrives at a checkout with items to
purchase. The cashier records the purchase items and collects
a cash payment. On completion the customer leaves with the items.
Type
Primary
67
System Behavior
Objective
identify system events and system operations
September 1,
68
makeNewsale()
enterItem(itemID, quantity)
Description, total
[* more items]
endSale()
Box to enclose
an iteration area.
September 1,
69
September 1,
70
September 1,
71
September 1,
72
September 1,
73
Objectives
identify concepts related to current development
cycle requirements
Identify attributes
September 1,
74
Sales LineItem
quantity
Records-sale-of
Item
0..1
1..*
Stocked-in
Contained-in
1
Store
Sale
Attributes
date
time
address
name
Capturedon
Houses
1..*
1
September 1,
Register
(POST)
75
September 1,
76
September 1,
77
Finding concepts:
Examples
September 1,
78
POST
Item
Sale
Store
Payment
SalesLineItem
ProductCatalog
September 1,
79
Specification Concepts
When are they needed?
September 1,
80
Specification Example
Assume that
an item instance represents a physical item in the store;
it has a serial number
an item has a description, price and UPC which are not
recorded anywhere else.
every time a real physical item is sold, a corresponding
software instance of item is deleted from the database
September 1,
81
September 1,
82
Specification - Example
ProductDesciption
description
price
UPC
Item
describes
Serial Number
1
XSpecification describes X
Item
Serial Number
description
Price
itemID
September 1,
83
Objective
Identify associations within a conceptual model
distinguish between need-to-know associations from
comprehension-only associations
September 1,
84
Associations
Records-current
POST
1
Sale
1
Association
September 1,
85
Finding Associations
A is recorded in B
Other associations
A uses or manages or controls B (Pilot -airplane)
A owns B (Airline -airplane)
September 1,
86
Association Guidelines
September 1,
87
Roles in Associations
September 1,
name
multiplicity expression
navigability
88
Multiplicity
Records-current
POST
1
Sale
1
89
Association - Multiplicity
September 1,
90
Associations - Contd.
Store
1
Contains
1..*
Records-current
POST
1
Paid-by
Sale
1
payment
1
September 1,
91
Associations - Contd.
Multiple associations between two types
flies-from
*
Flight
*
0..1
Airport
flies-to
0..1
92
Objectives
identify attributes in a conceptual model
distinguish between correct and incorrect attributes
September 1,
93
Attributes [1]
September 1,
94
Attributes [2]
September 1,
95
Attributes: Examples
worse
not a
"simple attribute
Cashier
name
currentPost
better
Cashier
name
POST
uses
1
number
96
Complex Attributes
September 1,
97
Complex Attributes
Flight
destination
Flies-to
Flight
1
September 1,
Airport
98
September 1,
99
Use cases suggest how actors interact with the software system
September 1,
100
September 1,
101
September 1,
102
UML notation -
Operation(arg:ArgType=defaultvalue,,,):ReturnType(s)
September 1,
103
Contracts
September 1,
104
Contract: Example
Operation: enterItem(itemID: ItemID, quantity: integer)
September 1,
105
Artifacts of Analysis
Analysis Artifact Questions Answered
Use Cases
Conceptual
model
Interaction
diagrams
Contracts
September 1,
106