1 cs 501 spring 2002 cs 501: software engineering lecture 9 techniques for requirements definition...
TRANSCRIPT
1 CS 501 Spring 2002
CS 501: Software Engineering
Lecture 9
Techniques for Requirements Definition and Specification I
2 CS 501 Spring 2002
Administration
Projects
• Comments are being sent to each group by email. Should complete today.
• Teaching Assistants assigned to each project. Will contact you.
Observations about Assignment 1
• Some projects too ambitious
• Do not design the project before requirements analysis.
Assignment 2 will be posted shortly
3 CS 501 Spring 2002
Assignment 2: What is in a Requirements Document?
Remember
• The requirements document specifies the functionality that you plan to deliver to the client
• It must be comprehensive and detailed. Everything must be written out -- no hand waving!
The requirements document is likely to be several times as long as Assignment 1.
4 CS 501 Spring 2002
Techniques for Requirements Analysis and Definition
• A variety of tools and techniques.
• Many are familiar from other courses.
• There is no correct technique that fits all situations.
The craft of requirements analysis and specification is to select the appropriate tool for the particular task.
(Other tools are described in Pfleeger, Chapter 4.)
5 CS 501 Spring 2002
Bad Example: Decision Table
University Admission Decision
Note that the rules are vague.
High SAT T F F F F F
High grades - T F F F F
Sports - - T T F F
Recommendations - - T F T F
Reject X X X
Accept X X X
6 CS 501 Spring 2002
Good Example: Decision Table
University Admission Decision
Note that the rules are now specific and testable.
SAT > S T F F F F F
GPA > G - T F F F F
Athletics code = - - T T F F
Recommendations > A- - - T F T F
Send rejection letter X X X
Send acceptance letter X X X
7 CS 501 Spring 2002
Data-Flow Models
External entities
Processing steps
Data stores or sources
Data flows
8 CS 501 Spring 2002
Data-Flow Example: University Admissions
Applicant
Applicationform Receive
application
Completedapplication
Evaluate
Rejection
Acceptance
9 CS 501 Spring 2002
Data-Flow Example: Assemble Application Stage
Applicant
Applicationform
Receive
Completedapplication
Supportinginformation
Pendingdatabase
Acknowledgment
Initiateevaluation
Applicantdatabase
Evaluationrequest
AND
AND
Acknowledgment
10 CS 501 Spring 2002
Data-Flow Example:Process Completed Application Stage
Rejection
Evaluation
Applicantdatabase
Evaluationrequest Acceptance Financial
aid
Offer
Specialrequest
11 CS 501 Spring 2002
Procedural Models: Flowchart
Operation
Decision
Manual operation
Report
12 CS 501 Spring 2002
Flowchart: University Admissions
Form received New?
Database record
T
Notify student
F Update database
Complete?
Notify student
T
FEvaluate
13 CS 501 Spring 2002
Procedural Models: Pseudo-code
Example: Check project plan
check_plan (report)
if report (date_time) > due_date_time then error (too_late) if report (client) = none then error (no_client) if report (team) < min_team or > max_team then error (bad_team) if error() = none then comments = read_report (report) return (comments (text), comments (grade)) else return error()
14 CS 501 Spring 2002
Entity-Relation Model
A Design Methodology for Relational Databases
• A database of entities and relations
• Tools for displaying and manipulating entity-relation diagrams
• Tools for manipulating the database (e.g., as input to database design)
Warning: There is much confusion about definitions and notation
15 CS 501 Spring 2002
Entity-Relation Diagram
An entity
A relation between entities
An entity or relation attribute
An inheritance relation
16 CS 501 Spring 2002
Example: CS 501 Project
Student
CS501 Student
Major
Project
5 to 7
1
Member of
Person
Client1
Tech contact
0:n0:n
0:n
17 CS 501 Spring 2002
Example: MARC Catalog Record
Caroline R. Arms, editor, Campus strategies for libraries and electronic information. Bedford, MA: Digital Press, 1990.
18 CS 501 Spring 2002
MARC Format for Books
001 89-16879 r93245 Campus strategies for libraries and electronic information260 {Bedford, Mass.} : Digital Press, c1990.650 Academic libraries--United States--Automation.650 Libraries and electronic publishing--United States.700 Arms, Caroline R. (Caroline Ruth)
19 CS 501 Spring 2002
Entity-Relation Diagram for MARC
Book
Short title
Catalog record
Describes
Control numb
Subject heading
Is about
CreatorEditor of
Author of
1:n
1
0:n
0:n
0:n
0:n
0:n
0:n
20 CS 501 Spring 2002
Data Dictionaries
A data dictionary is a list of names used by the system
• Brief definition (e.g., what is "date")
• What is it (e.g., number, relation)
• Where is it used (e.g., source, used by, etc.)
• May be combined with a glossary
As the system is implemented, the data dictionary in the requirements is input to the system data dictionary, which is a formal part of the system specification.
21 CS 501 Spring 2002
A Note on Object Models
This course teaches object models as a tool for design.
Some people recommend object models for requirements definition, but it is difficult to use them without constraining the system design.
22 CS 501 Spring 2002
Examples
For examples of requirements documentation, see the Pfleeger web site:
http://www.cs.umd.edu/~sharip/swebook/requirement.html
23 CS 501 Spring 2002
Discussion of Pfleeger, Chapter 4
Format:
State a question.
Ask a member of the class to answer.
(Sorry if I pronounce your name wrongly.)
Provide opportunity for others to comment.
When answering:
Stand up.Give your name or NetID. Make sure the TA hears it.
Speak clearly so that all the class can hear.
24 CS 501 Spring 2002
Question 1: Terminology
(a) What is the purpose of requirements definition?
(b) What is the purpose of requirements specification?
(c) What are functional requirements?
(d) What are non-functional requirements?
25 CS 501 Spring 2002
Question 2: Static descriptions of requirements
(a) What is a static requirements definition?
(b) Give two examples of application areas where a static requirements description might be used.
(c) How do static definitions of requirement relate to system testing?
(d) How do static definitions of requirement relate to system and program design?
26 CS 501 Spring 2002
Question 3: Transition Diagrams
(a) What does the book mean by a state? Give an example.
(b) What does the book mean by a transition? Give an example.
(c) Explain the notation in the expression:
f (Si, Cj) = Sk
Use the following diagram as an example:
S1 S2
S30
0
0
1
11
27 CS 501 Spring 2002
Question 4: Petri Nets
Explain the following diagrams:
A
S1
Sm
S
S
A
Event 1
Event n
Event
A
Event 1
Event n
..
28 CS 501 Spring 2002
Question 5: Prototyping Requirements
(a) How does rapid prototyping differ from other forms of prototyping?
(b) Under what circumstances would you use rapid prototyping?