30
1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

1 CS 501 Spring 2006

CS 501: Software Engineering

Lecture 9

Requirements 3

Page 2: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

2 CS 501 Spring 2006

Course Administration

Feasibility Study

Everybody should receive comments shortly.

Teaching Assistants have been assigned.

Quiz 1

Uncollected answer books are at the reception at 301 College Avenue.

Quiz 3

This quiz may be moved to March 16.

Page 3: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

3 CS 501 Spring 2006

Discussion of Feasibility Study

General

Who will read the feasibility study?What is needed to decide to go ahead?

Scope and understanding of project

Statement of the task Preliminary requirements and technical analysisDeliverables and business considerations

Confidence

Outline plan. Does it inspire confidence?Visibility plan.  How will progress be reported?  Risk analysis. How are the risks to be minimized?

Page 4: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

4 CS 501 Spring 2006

Course Administration

Assignment 2, First Milestone, March 7-10

Read updated information on the Assignments Web page

Book time for your presentation. See the home page of the Web site.

i Client must be present

ii Not all team members must be present, but each team member must present at least once during the

semester

iii Try to find a time when the TA can be present

Page 5: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

5 CS 501 Spring 2006

Course Administration

Assignment 2, First Milestone, March 7-10

• One third of the total work from the feasibility study.

• If you are following an iterative process, a major milestone when you can report visible progress to your client. Typically, this will include a first set of requirements, a provisional design and a prototype that can be used to demonstrate the functionality of the system, including user interface design.

• If you are following a modified waterfall process, this progress report should include completion of the requirements phase.

Page 6: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

6 CS 501 Spring 2006

Software Development Principles and Practices

Software development

Software development is a craft. Software developers have a variety of tools that can be applied in different situations.

Part of the art of software development is to select the appropriate tool for a given implementation

Page 7: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

7 CS 501 Spring 2006

Modeling Techniques for Requirements Analysis and Definition

The craft of requirements analysis and specification is to select the appropriate tool for the particular task.

• A variety of tools and techniques.

• Many are familiar from other courses.

• There is no correct technique that fits all situations.

As you build understanding of the requirements through scenarios and use cases, use modeling tools to specify requirements. The models provide a bridge between the client's understanding and the developers.

Page 8: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

8 CS 501 Spring 2006

Decision Table: Bad Example

University Admission Decision

Note that the rules are too 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

Page 9: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

9 CS 501 Spring 2006

Decision Table: Good Example

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

Page 10: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

10 CS 501 Spring 2006

Data-Flow Models

External entities

Processing steps

Data stores or sources

Data flows

An informal modeling technique to show the flow of data through a system.

Page 11: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

11 CS 501 Spring 2006

Data-Flow Example: University Admissions

Applicant

Applicationform Receive

application

Completedapplication

Evaluate

Rejection

Acceptance

Shows the flow, but where is the data stored?

Page 12: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

12 CS 501 Spring 2006

Data-Flow Example: Assemble Application Stage

Applicant

Applicationform

Receive

Completedapplication

Supportinginformation

Pendingdatabase

Acknowledgment

Initiateevaluation

Applicantdatabase

Evaluationrequest

AND

AND

Acknowledgment

Does this model cover all applications? Are there special cases?

Page 13: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

13 CS 501 Spring 2006

Data-Flow Example:Process Completed Application Stage

Rejection

Evaluation

Applicantdatabase

Evaluationrequest Acceptance Financial

aid

Offer

Specialrequest

The data-flow diagram will need specification of the decision-making process.

Page 14: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

14 CS 501 Spring 2006

Procedural Models: Flowchart

Operation

Decision

Manual operation

Report

An informal modeling technique to show the decisions and paths that data takes through a system.

Page 15: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

15 CS 501 Spring 2006

Flowchart: University Admissions

Form received New?

Database record

T

Notify student

F Update database

Complete?

Notify student

T

FEvaluate

Page 16: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

16 CS 501 Spring 2006

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()

An informal modeling technique to show the logic behind part of a system.

Page 17: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

17 CS 501 Spring 2006

Entity-Relation Model

A requirements and 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

Page 18: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

18 CS 501 Spring 2006

Entity-Relation Diagram

An entity

A relation between entities

An entity or relation attribute

An inheritance relation

Page 19: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

19 CS 501 Spring 2006

Example: CS 501 Project

Student

CS501 Student

Major

Project

5 to 7

1

Member of

Client team member

Client1:n

Tech contact

0:n0:1

0:1

Page 20: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

20 CS 501 Spring 2006

Example: Schema for Web Data

CS 501 Spring 2005

Page 21: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

21 CS 501 Spring 2006

Part of an Entity-Relation Diagram for a Book Catalog

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

1

Page 22: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

22 CS 501 Spring 2006

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.

Page 23: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

23 CS 501 Spring 2006

Petri Nets

A Petri Net models parallelism

A

S1

Sm

S

S

A

Event 1

Event n

Event

A

Event 1

Event n

..

f(A; E) S

f(A; E1,..,En) S

f(A; E1,..,En) S1,..,Sm

Page 24: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

24 CS 501 Spring 2006

Transition Diagrams

A system is modeled as a set of states, Si

A transition is a change from one state to another.

The occurrence of a condition, Ci, causes the transition from one state to another

Transition function:

f (Si, Cj) = Sk

Example S1 S2

S30

0

0

1

11

Page 25: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

25 CS 501 Spring 2006

Therapy Control Consol: Scenario

"The set up is carried out before the patient is made ready. The operator selects the patient information from a database. This provides a list of radiation fields that are approved for this patient. The operator selects the first field. This completes the set up.

The patient is now made ready. The lock is taken off the machine and the doses with this field are applied. The operator then returns to the field selection and choose another field."

Page 26: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

26 CS 501 Spring 2006

Therapy Control Consol: Finite State Machine

Example: Radiation Therapy Control Console

You are developing requirements for the operator's control console. In a client interview, the client describes the dangers inherent in using the machine.

The operator must follow a strict procedure before the machine is ready to run.

You use a finite state machine to specify the procedures. This shows the client that you understand the requirements and specifies the procedures for the developers.

Page 27: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

27 CS 501 Spring 2006

State Transition Diagram

Patients Fields Setup ReadyBeam

on

Enter Enter Start

Stop

Select field

Select patient(lock on)

(lock off)

Discuss each state and transition with the client.

Page 28: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

28 CS 501 Spring 2006

Therapy Control Consol: State Transition Table

SelectPatient

SelectField

Enter lock off Start Stop lock on

Patients

Fields

Setup

Ready

Beamon

Fields

Fields

Fields

Patients

Patients

Patients

Setup

Setup

Setup

Ready

Beamon

Ready

Page 29: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

29 CS 501 Spring 2006

Prototyping Requirements

Rapid prototyping is the most comprehensive of all modeling methods

A method for specifying requirements by building a system that demonstrates the functionality of key parts of the required system

Particularly valuable for user interfaces

Page 30: 1 CS 501 Spring 2006 CS 501: Software Engineering Lecture 9 Requirements 3

30 CS 501 Spring 2006

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.

Flow charts and finite state machines are supported by UML as design models, but can also be used for requirements.

*