CS 551 – Requirements and Prototyping Thanks to Rand Edwards and Ian Summerville for this material

Preview:

Citation preview

CS 551 – Requirements and Prototyping

Thanks to Rand Edwards and Ian Summerville for this material

Software Requirements Process

Requirements Elicitation Requirements Analysis Use Cases Requirements Specification Prototype Requirements Management

Requirements Specification Spec

1. Project Title, Revision Number and Author2. Scope and Purpose of the system3. Measurable Operational Value4. Description5. Feature List including ICED T and Simplified QFD

analysis6. Interfaces7. Constraints8. Change Log and Expected Changes9. Responses to the unexpected10. Measurements11. Glossary12. References

QSE Characteristics

Solving the right problem the right way Certified against requirements. Certified against problem Bounded execution domain

Trustworthy Software is:

Safe: Does no harm Reliable: No crash or hang. Secure: No Hacking Possible

QSE Lambda Protocol

Prospectus Measurable Operational Value Prototyping or Modeling sQFD Schedule, Staffing, Quality Estimates ICED-T Trade-off Analysis

Universal Software Engineering Equation

Reliability (t) = ℮ -k t

when the error rate is constant and where k is a normalizing constant for a software shop and

= Complexity/ effectiveness x staffing

Case Study: SchedulerPro Prospectus

User friendly, efficient interface for students to create and modify class schedules.

Features:• Visual schedule creation and editing

• Schedule suggestion

• Schedule comparison view

• Monitor closed-out sections

SchedulerPro Prototype Screen

SchedulerPro Prototype Screen

SchedulerPro Notification Emails

Measurable Operational Value SchedulerPro MOV

Course scheduling and registration time reduced by an average of 20 minutes per student per semester.

SchedulerPro Functional Goals

Schedule Classes and Personal Time

Searching

Course Placement

Course Detail Viewing

Course Removal

Scheduling Personal Blocks

Notification (optional)

Course Suggestions (optional)

SchedulerPro Functional Requirements

• Search available classes by: Same professor Similar time Same or equivalent class but different sections

• Register and track registrations

• Color classes and arbitrary time-blocks by user choice

SchedulerPro Nonfunctional Requirements

• Integrate with “Web for Students’ and existing authentication systems and avoid incompatibilities

• Allow schedules to be saved/accessed from a server or local file

• Provide a scaled time-accurate visual representation of the schedule

More Non-functional requirements

Make schedules available even if the application is down, provided an internet connection is available

Perform some functions without a live connection to the ‘Web for Students’ registrar web site

Make compatible with all popular browsers• Display section states and print schedules without

loss of detail

SchedulerPro sQFD

Features / Functions

Class FiltersAllocate non-class

timeLong term information

availabilityAuthenticate

Makes scheduling classes easier 8 3 6 2 19

Makes scheduling a semester easier

7 9 8 2 26

Find schedules in one place 1 1 5 7 14

Total 16 13 19 11 59

SchedulerPro Product Reliability

Two hours of unavailability allows for daily backups, service, and reboots of the system

Connections to server are minimized, reducing overall activity on the server

Jan. Function Point Est.

Function Low (L) Average (A) High (H) Total

Outputs 1 3 0 19

Inquiries 8 4 1 49

Inputs 5 7 1 41

Internal Files 3 2 0 24

External Interfaces 2 1 0 10

Total UFP 143

Adjustment Factor 0.99

Total AFP 141

April Function Points Est.Function Low Average High Total

Outputs 1 0 1 9

Inquiries 3 0 0 9

Inputs 2 3 0 18

Internal Files 3 1 0 31

External Interfaces 1 1 0 12

Total UFP 79

AFP 82

History of Function Points

Date AFP Project Length*

Projected Finish*

January 27 141 19.7 staff months

August 2006

February 24 104 14.4 staff months

March 2006

April 17 82 8.5 staff months

May

2006

*Using COCOMO Model

Web PointsFunction Total Web

Objects

Outputs 11

Inquiries 9

Inputs 18

Internal Files 31

External Interfaces 12

# Multimedia files 6

# Web building blocks 7

# Scripts 3

# Links 0

Total Web Objects 97

Effort = A * cdi (Size)P1

Because it is a small web project, assume:

A=2.1, B=2.0, P1=1.00, and P2=.5

Language Expansion Factor = 25

From this, we estimate 2.43 KLOC

Effort = A* KLOC = 2.1 * 2.43

= 5.103= 5.103 staff-months staff-months Duration =B * EffortP2 = 2.0 * 5.103.5

= 4.5184.518 calendar months calendar months

ICED-T

Scheduling by:Intuitive Consistent Efficient Durable Thoughtful

Paper 3 2 2 2 3

Excel 3 2 3 3 3

School Scheduler 3 4 4 3 4

SchedulerPro 4 4 5 4 5

SchedulerPro Creeping Features

Are the System Administrators important stakeholders?

You bet…

Parnas reliability checklist

Failures in communication, secondary storage, memory, or any hardware that may interrupt a transaction:

» The SQL Server DBMS will not commit incomplete transactions. User will be notified of the error, and will have to redo the transaction.

Operator error:» Important operations are confirmed before they are completed to

avoid large accidental errors.

SchedulerPro Estimate of Reliability

R(t) = 1 - F(t) R(t) = 1 - F(t) F(t) = P(T ≤ t)F(t) = P(T ≤ t)

During load testing, we discovered the test server can support 1500 user queries a minute.

P(failures/query) = 55/1500 = 0.036P(failures/query) = 55/1500 = 0.036

Thus, F(t) = 3.6%, which means the software is 96.4% reliable

SchedulerPro Reliability Estimate

1/ λ = MTTF = εE/kC k = scaling constant = 1

C is complexity = 2.78

E is the development effort = 36.4ε is the expansion factor = 1.5

λ = 0.05

t is the continuous execution time for the software

R(t) = 95.12%

Complexity Chart - Client

Project Type: online transaction

Problem Domain: 2 Architecture Complexity: 3 Logic Design – Data: 2 Logic Design – Code: 3

» Total Score: 10

» Complexity = (10/18) * 5 = 2.78

Complexity Chart - Server

Project Type: online transaction

Problem Domain: 1 Architecture Complexity: 2 Logic Design – Data: 2 Logic Design – Code: 2

» Total Score: 7

» Complexity = (7/18) * 5 = 1.94

Complexity Chart - Overall

Project Type: client/server Problem Domain: 2 Architecture Complexity: 3 Logic Design – Data: 2 Logic Design – Code: 3

» Total Score: 10

» Complexity = (10/18) * 5 = 2.78

SchedulerPro Installation Plan

Installation

1. Third Party Software Required

Scheduler Pro requires the following products to be already installed on the target machine. Please consult the documentation of each product for installation instructions specific to each.

- Windows 2000, XP, or 2003 Server- Microsoft IIS, version 5.0 or higher- Microsoft .NET, version 1.1- Microsoft SQL Server 2000- Message Queuing Service (Windows component)- ASP.NET State Service

2. Installing the Scheduler Pro applicationTo install Scheduler Pro, please follow these steps:

I. Setting up the web site1. Create a virtual directory for the site in IIS2. Copy the contents of the “site” folder to the directory on your hard drive represented

by the IIS virtual directoryII. Setting up the database

1. Using the SQL Server Enterprise Manager tool, attach the database located under the “sqldb” directory.2. Create a new user account for accessing this database, and give it read/write access for the database.

III. Installing the Suggest, Notified, and Data Loader Windows ServicesOpen the directory titled “services”. Run each of these files: - InstallSuggestService.exe - InstallNotifierService.exe - InstallDataLoaderService.exe

Each installer will properly install the service. The Data Loader installer willalso ask you for the location and name of the course data file it will load.

SchedulerPro Installation Plan

Requirements Engineering Process

Requirements Document & Validation Report

Requirements ElicitationRequirements Elicitation

Requirements AnalysisRequirements Analysis

Agreed Requirements

Prospectus

Decision Point: Accept Document or re-enter spiral

Requirements SpecificationRequirements Specification

Requirements ValidationRequirements Validation

Prototype

Simple QFD

Baseline Document

Key Question

What’s the problem?

Prospectus & Elicitation

What Information do we need?• Description of the Problem

• Description of the Environment

• Scope of Solution

• A list of project goals

• Any constraints on the behavior or structure of the solution-system

Interviews

Scenarios

Prototypes

Facilitated Meetings

Observation

Elicitation Techniques

Elicitation Challenges

Experts don’t know what they know!• Much knowledge is tacit thru extensive use• Difficult to dig it out• Know-how expressed as solutions

Analysts are domain novices• Tend to simplify • Often miss key functions

Software Requirements

Objective Requirements Elicitation Overview Requirements Analysis Unified Modeling Language

• Use Cases

• Behavioral Modeling

Requirements Engineering Process

Requirements ElicitationRequirements Elicitation

Requirements Analysis & Negotiation

Requirements Analysis & Negotiation

Agreed Requirements

Draft Requirements Document

Requirements Document & Validation Report

Informal Statement of Requirements

Decision Point: Accept Document or re-enter spiral

Requirements SpecificationRequirements Specification

Requirements ValidationRequirements Validation

Process Models Process Actors and

Stakeholders Process Support and

Management Process Quality and

Improvements Relationship to the

Business Decision

Requirements Process - Context

Varied Sources» Different Processes

» Risk Factors Different “Consumers”

» Development

» Marketing

» Training

» Documentation

» Information Base

RequirementsEngineering

Process

BusinessStrategy

BusinessStrategy

TechnologyStrategy

TechnologyStrategy

Project, Process & DocumentationStandards

Project, Process & DocumentationStandards

OpportunityAnalysis

MarketAnalysis

CustomerRequest

SoftwareDesign

SoftwareDevelopment

SoftwareTesting

Requirements Document

Requirements Document

Marketing,Etc.

UML Framework

Source: Martin, James, Odell, James J., Object-Oriented Methods:

A FoundationUML Edition

Prentice-Hall PTR, 1998

Source: Martin, James, Odell, James J., Object-Oriented Methods:

A FoundationUML Edition

Prentice-Hall PTR, 1998

Basic Foundation Level

Types (Concepts)ObjectsMappingsRelationshipsAssociationsSubtypes/SupertypesStates

EventsOperationsMethodsTriggersControl ConditionsState Changes

AggregationConstraintsRules

ClassificationMeta-ModelsPower Types

Extended Foundation Level

StructuralSpecification

BehavioralSpecification

OO ProgramLanguages

… …

ClassDiagram

…ActivityDiagram

…C++

Smalltalk…

Application Level

Use Cases Drive Development

Use Cases

Test Case Design

Architecture and Design

Mapping Requirements to a Framework

Requirements

• Purpose

• Prioritized

• Categorized

• Dependencies resolved

• Quantified

• Bounded

PMO Models

Requirements

ElicitationReports

Use CassUse Cass

ICED-T• Intuitive• Consistent• Efficient• Durable• Thoughtful

ICED T Mappings

Ratings

1 = ‘Worst I have ever seen’

2 = ‘Worse than Average’

3 = ‘Average, like most other systems’

4 = ‘Better than Average’

5 = ‘Best I have ever seen’

Mapping Requirements to a Framework

PMO Models

Requirements

ElicitationReports

Use Cases

Use Cases

Static Structure

Static Structure

Activity Model

Activity Model

UML Framework•Use Case Diagram•Class Diagram•Component Diagram•Activity Diagram•State Chart•Sequence Chart•Timing Chart

Only as needed!

Package Diagram

Groups related use cases Forms basis for a

functional partitioning from the users point of view.

Shorthand for tracking within the project

Order Entry

ViewStatus

Create & Submit Orders

Activity Chart

EnterOrder

CheckCredit

[submitted]

[aborted]

[denied]

AllocateInventory

[approved]

PrepareDelivery

ReceivePayment

Create Order& Submit

<<trace>>

Order Entry Finance FinanceShippingInventory

Management

Simplified QFD (scale 0 to 10)

Goals/Features Track Delivery Trucks

.On-line Customer Inquiry

Credit Check

1. Easy to Order 0 9 3

2. 10% Less Inventory

0 0 0

3. 20% Profit Increase

3 9 9

4. Speed Product Introduction

0 9 0

Total 3 27 12

Required Measurements

Function Points ICED T Consistency = %features with average QFD > 7 Stability = feature changes/month

Prototyping

Prototyping is the rapid development of a system The principal use is to help customers and

developers understand the requirements for the system• Requirements elicitation – Users can experiment with a

prototype to see how the system supports their work• Requirements validation – The prototype can reveal

errors and omissions in the requirements Prototyping can be considered as a risk reduction

activity

Five Great Patterns

Solo Virtuoso

Code Ownership

Engage QA

Divide and Conquer Prototype

Reference: Technical Memorandum by J. O. Coplien Document No. BL0112650-940906-50TM

Product Size Reduction

TRADITIONAL PROCESS PROTOTYPING

40% REDUCTION

20%

80%

40%

30%

45%

25%

SystemsEngineering

Design,Develop,

Test,Install

FinalDevelopment,Deployment

SystemsEngineering &

Prototype

FinalDevelopment

Deployment

As of 8 Sept 05

Prototyping Benefits

Misunderstandings between software users and developers are exposed

Missing services may be detected and confusing services may be identified

A working system is available early in the process The prototype may serve as a basis for deriving a

system specification The system can support user training and system

testing

Approaches to Prototyping

Prospectus

Evolutionaryprototyping

Throw-awayPrototyping

Deliveredsystem

Executable Prototype +System Specification

Prototyping Objectives

The objective of evolutionary prototyping is to deliver a working system to end-users• The development starts with those requirements

which are best understood. The objective of throw-away prototyping is to

validate or derive the system requirements• The prototyping process starts with those

requirements which are poorly understood

Evolutionary Prototyping

Must be used for systems where the requirements specification cannot be developed in advance

Based on techniques which allow rapid system iterations

Verification is impossible as there is no specification

Validation means demonstrating the adequacy of the system

Evolutionary Prototyping

Build prototypesystem

Develop abstractspecification

Use prototypesystem

Deliversystem

Systemadequate?

YES

N

Evolutionary Prototyping Advantages

Accelerated delivery of the system• Rapid delivery and deployment are sometimes more important

than functionality or long-term software maintainability

User engagement with the system• Not only is the system more likely to meet user requirements,

they are more likely to commit to the use of the system

Evolutionary Prototyping

Specification, design and implementation are inter-twined

The system is developed as a series of increments that are delivered to the customer

Techniques for rapid system development are used such as CASE tools and 4GLs

User interfaces are usually developed using a GUI development toolkit

Evolutionary Prototyping Problems

Management problems• Existing management processes assume a waterfall

model of development

• Specialist skills are required which may not be available in all development teams

Maintenance problems• Continual change tends to corrupt system structure so

long-term maintenance is expensive Contractual problems

Prototypes as Specifications

Some parts of the requirements may be impossible to prototype• E.g., safety-critical functions

An implementation has no legal standing as a contract

Non-functional requirements cannot be adequately tested in a system prototype

Incremental Development

System is developed and delivered in increments after establishing an overall architecture

Requirements and specifications for each increment may be developed

Users may experiment with delivered increments while others are being developed• These serve as a form of prototype system

Intended to combine some of the advantages of prototyping • More manageable process• Better system structure

Incremental Development Process

Validateincrement

Build systemincrement

Specify systemincrement

Design systemarchitecture

Define systemdeliverables

Systemcomplete?

Integrateincrement

Validatesystem

Deliver finalsystem

YES

NO

Throw-away Prototypes

Used to reduce requirements risk The prototype is developed from an initial

specification, delivered for experiment then discarded

The throw-away prototype must NOT be considered as a final system• Some system characteristics may have been left out

• There is no specification for long-term maintenance

• The system will be poorly structured and difficult to maintain

Throw-away Prototyping

Outlinerequirements

Developprototype

Evaluateprototype

Specifysystem

Developsoftware

Validatesystem

Deliveredsoftwaresystem

Reusablecomponents

Rapid Prototyping Techniques

Various techniques may be used for rapid development• Dynamic high-level language development

• Database programming

• Component and application assembly These techniques are often used together Visual programming is an inherent part of most

prototype development systems

Dynamic High-level Languages

Languages which include powerful data management facilities

Need a large run-time support system. Not normally used for large system development

Some languages offer excellent UI development facilities

Some languages have an integrated support environment whose facilities may be used in the prototype

Choice of Prototyping Language

What is the application domain of the problem? What user interaction is required? What support environment comes with the

language? Different parts of the system may be programmed

in different languages Example languages

• Java, Smalltalk, Lisp, Prolog, Perl, Tcl/TK

Database Programming Languages

Domain specific languages for business systems based around a database management system

Normally include a database query language, a screen generator, a report generator and a spreadsheet

May be integrated with a CASE toolset The language + environment is sometimes known as a “4GL” Cost-effective for small to medium sized business systems

DBprogramming

language

Interfacegenerator Spreadsheet

Reportgenerator

Database management system

Fourth-generation language

Prototyping with Reuse

Application level development• Entire application systems are integrated with the prototype so

that their functionality can be shared

• For example, if text preparation is required, a standard word processor can be used

Component level development• Components are mutually independent

• Individual components are integrated within a standard framework to implement the system

• Framework can be a scripting language or an integration platform.

Key points

A prototype can give end-users a concrete understanding of the system’s capabilities

Prototyping is used when rapid development is essential

Throw-away prototyping is used to understand the system requirements

In evolutionary prototyping, the system is developed by gradually adding features.

Guidelines

Rapid prototyping may require leaving out functionality or relaxing non-functional constraints

Prototyping techniques include the use of very high-level languages, database programming and prototype construction from reusable components

Prototyping is essential for parts of the system such as the user interface which cannot be effectively pre-specified

Users must be involved in prototype evaluation

Case History

Harbor Radar

CS 551 Senior Design

Project Overview

To primarily serve boaters in the Hudson River area with a 40 mile radius and inexpensive TV to display weather info, buoy data, and plotted locations

Interactive website• Accessible to everyone• Secure section where admin can control

information displayed with ability to plot coordinates and alter broadcast information

Difficult time writing requirements and setting scope

Requirements

Website Design-Easy to use, clean, intuitive and clearly display

maps Reliability

• High reliability requested by customer• Availability

» Ultimate goal of 24/7, however probably not doable. 20/7 has been suggested

Requirements (cont.)

Performance• Website will support 50 simultaneous users

» Reach for goal of 100• Television broadcast(s) place little load on the system• Response Time

» Average of .5s Constraints

• Television resolution will be an issue» Aim to be readable on a 9” screen

• Support both IE and Netscape, versions TBD

Map Module Screenshots

Larger View

Grid

Icons

Wrapper Module for TV Screens