Title: Developing Requirements
1Object-Oriented Software EngineeringPractical
Software Development using UML and Java
- Chapter 4
- Developing Requirements
Based on Presentations LLOSENG (Lethbridge,
Laganiere,2001, Williams 2001, Probert 2001)
2Requirements Engineering
- Motto"The hardest single part of building a
software system is deciding what to build. No
other part of the work so cripples the resulting
system if done wrong. No other part is more
difficult to rectify later."Brooks 87
34.1 Domain Analysis
- The process by which a software engineer learns
about the domain to better understand the
problem - The domain is the general field of business or
technology in which the clients will use the
software - A domain expert is a person who has a deep
knowledge of the domain - Benefits of performing domain analysis
- Faster development
- Better system
- Anticipation of extensions
4Domain Analysis document
- A. Introduction
- B. Glossary
- C. General knowledge about the domain
- D. Customers and users
- E. The environment
- F. Tasks and procedures currently performed
- G. Competing software
- H. Similarities to other domains
54.2 The Starting Point for Software Projects
green field project
64.3 Defining the Problem and the Scope
- A problem can be expressed as
- A difficulty the users or customers are facing,
- Or as an opportunity that will result in some
benefit such as improved productivity or sales. - The solution to the problem normally will entail
developing software - A good problem statement is short and succinct
7Defining the Scope
- Narrow the scope by defining a more precise
problem - List all the things you might imagine the system
doing - Exclude some of these things if too broad
- Determine high-level goals if too narrow
- Example A university registration system
84.4 What is a Requirement
- Requirement A statement about the proposed
system that all stakeholders agree must be made
true in order for the customers problem to be
adequately solved. - Short and concise piece of information
- Says something about the system
- All the stakeholders have agreed that it is valid
- It helps solve the customers problem
- A collection of requirements is a requirements
document.
94.5 Types of Requirements
- Functional requirements
- Describe what the system should do
- Non-functional requirements
- Constraints that must be adhered to during
development
10Functional requirements
- What inputs the system should accept
- What outputs the system should produce
- What data the system should store that other
systems might use - What computations the system should perform
- The timing and synchronization of the above
11Example of Functional Requirements
A point of sale terminal must make it possible to
record sales and payments. It is intended to be
used in retail stores. The system includes
hardware components and a software to run the
system. The project goal is to develop the
software.
12Non-functional requirements
- All must be verifiable
- Three main types
- 1. Categories reflecting usability, efficiency,
reliability, maintainability and reusability - Response time
- Throughput
- Resource usage
- Reliability
- Availability
- Recovery from failure
- Allowances for maintainability and enhancement
- Allowances for reusability
13Non-functional requirements
- 2. Categories constraining the environment and
technology of the system. - Platform
- Technology to be usedÂ
- 3. Categories constraining the project plan and
development methods - Development process (methodology) to be used
- Cost and delivery date
- Often put in contract or project plan instead
14Requirements Quality
- Requirements should be
- 1. Correct.
- 2. Coherent - without
- Internal conflicts (contradictions, too general
terms having various possible interpretations). - External conflicts (subsystem requirements
conflicting with those of the systems). - Conflicts with standards.
- Coherence can be verified - using formal approach
by organizing requirements (in tables/dictionaries
, keeping references) - 3. Complete - having
- all the required functions,
- all the constraints,
- all contingencies
15Requirements Quality (1)
- Requirements should be
- 4. Realists - according to
- budget,
- the existing technology,
- the required schedule
- 5. Necessary
- shouldnt add non-necessary complications
- should be at the right level
- 6. Verifiable (testable)
- 7. Traceable (possibility to refer to
requirements in a clear way). - Non-functional requirements should be
- Measurable. Ex. rather than the system must be
portable not more than 5 of the source code
must be system dependent. - Linked to functional requirements affected.
164.6 Some Techniques for Gathering and Analysing
Requirements
- Observation
- Read documents and discuss requirements with
users - Shadowing important potential users as they do
their work - ask the user to explain everything he or she is
doing - Session videotaping
- Interviewing
- Conduct a series of interviews
- Ask about specific details
- Ask about the stakeholders vision for the future
- Ask if they have alternative ideas
- Ask for other sources of information
- Ask them to draw diagrams
17Gathering and Analysing Requirements...
- Brainstorming
- Appoint an experienced moderator
- Arrange the attendees around a table
- Decide on a trigger question
- Ask each participant to write an answer and pass
the paper to its neighbour - Joint Application Development (JAD) is a
technique based on intensive brainstorming
sessions
18Gathering and Analysing Requirements...
- Prototyping
- The simplest kind paper prototype.
- a set of pictures of the system that are shown to
users in sequence to explain what would happen - The most common a mock-up of the systems UI
- Written in a rapid prototyping language
- Does not normally perform any computations,
access any databases or interact with any other
systems - May prototype a particular aspect of the system
19Gathering and Analysing Requirements...
- Informal use case analysis
- Determine the classes of users that will use the
facilities of this system (actors) - Determine the tasks that each actor will need to
do with the system - More on use cases in Chapter 7
20Example Library System
- List a minimal set of use cases for the following
actors in library system Borrower, Checkout
Clerk, Librarian, Accounting System - Borrower
- Search for itens by title
- By author
- by subject
- Place a book on hold if it is checked out by
somebody else - Check the borrows personal information and list
of book borrowed
21Example Library System (1)
- List a minimal set of use cases for the following
actors in library system Borrower, Checkout
Clerk, Librarian, Accounting System - Checkout clerk
- All the Borrowers use cases, plus
- Check out an item for a borrower
- Check on an item that has been returns
- Renew an item
- Recorded that a fine has been paid
- Add a new borrower
- Update a borrowers personal information
(address, telephone number etc.
22Example Library System (2)
- List a minimal set of use cases for the following
actors in library system Borrower, Checkout
Clerk, Librarian, Accounting System - Librarian
- All the Borrowers and Checkout Clerk use cases,
plus - Add a new item to the collection
- Delete an item from the collection
- Change the information the system has recorded
about an item - Accounting System (acting autonomously)
- Obtain the amount of overdue fines paid by
borrowers
234.7 Types of Requirements Document
- Two extremes
- An informal outline of the requirements using a
few paragraphs or simple diagrams - requirements definition
- A long list of specifications that contain
thousands of pages of intricate detail - requirements specification
- Requirements documents for large systems are
normally arranged in a hierarchy
Requirements
Requirements
Definition
Definition
xxxx
xxxx
xxxxxxx
xxxxxxx
Requirements
xxx
Requirements
xxx
Requirements
xxxxxxxxxxx
xxxxxxxxxxx
Specification
Specification
xxxxx
Specification
xxxxx
xxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxx
xxxx
xxxxxxx
xxxxxxx
xxxxxxx
xxxxxxx
xxxxxxx
xxx
xxx
xxx
xxx
xxx
xxxxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxxxxxx
xxxxxxxxxxx
xxxxxxxxxxx
xxxxx
xxxxx
xxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxxxxxxxx
xxxxxxx
xxxxxxx
xxxxxxx
xxx
xxx
xxx
xxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
xxxxxxxxxxxxxxx
24Level of detail required in a requirements
document
- How much detail should be provided depends on
- The size of the system
- The need to interface to other systems
- The readership (target audience)
- The stage in requirements gathering
- The level of experience with the domain and the
technology - The cost that would be incurred if the
requirements were faulty
254.8 Reviewing Requirements
- Each individual requirement should
- Have benefits that outweigh the costs of
development - Be important for the solution of the current
problem - 80 of the users problem can be solved with 20
of the work. - Be expressed using a clear and consistent
notation - Example rather than The pharmacist will enter
the patient ID number and then the patients
medication record will be displayed, write
When the pharmacist enters the patient ID
number, then system displays the patients
medication record. - Be unambiguous
- Be logically consistent
- Lead to a system of sufficient quality
- All requirements should contribute to a system
that is sufficiently usable, safe, efficient,
reliable and maintainable. - Be realistic with available resources
- Be verifiable
- Be uniquely identifiable
- Does not over-constrain the design of the system
26Requirements documents...
- The document should be
- sufficiently complete
- well organized
- clear
- agreed to by all the stakeholders
- Traceability
27Requirements document...
- A. Problem
- B. Background information
- C. Environment and system models
- D. Functional Requirements
- E. Non-functional requirements
284.9 Managing Changing Requirements
- Requirements change because
- Business process changes
- Technology changes
- The problem becomes better understood
- Requirements analysis never stops
- Continue to interact with the clients and users
- The benefits of changes must outweigh the costs.
- Certain small changes (e.g. look and feel of the
UI) are usually quick and easy to make at
relatively little cost. - Larger-scale changes have to be carefully
assessed - Forcing unexpected changes into a partially built
system will probably result in a poor design and
late delivery - Some changes are enhancements in disguise
- Avoid making the system bigger, only make it
better
294.10 Detailed Example
- GPS-base Automotive Navigation Assistant (GANA)
- Problem GANA software will help drivers navigate
by giving them directions to their destination.
304.10 Detailed Example (1)
- GPS-base Automotive Navigation Assistant (GANA)
- Problem GANA software will help drivers navigate
by giving them directions to their destination. - Backgrounf information. See domain analysis
document 1234 (not provided for the lectures) - Environment and system models GANA software is
to run on special GANA hardware, described
separately in document 1234. As described in
document 1234, the hardware provides the
following to the software a) GPS position
information, b) a wireless Internet connection to
a map data base, c) position of a trackball, d) a
color 10cm x 10cm LCD screen, and f) in put from
the cars other systems containing data about
speed and turning of the steering wheel. This
requirements document describes the software only.
314.10 Detailed Example(2)
- GPS-base Automotive Navigation Assistant (GANA)
- Functional Requirements.
- The system uses GPS information to calculate what
map to display. The system also integrates
information about the cars speed and history of
turns made in order to refine its accuracy about
the vehicles location. - The system has two main interaction modes In
setup mode, the user consults maps and specifies
the destination. In navigation mode,the system
assists the user to navigate to the destination. - Setup mode
- 3.1 When the system is switched on, and the
vehicle is stationary, it enters setup mode. If
the vehicle is moving it enter navigation mode.
For safety reasons you can not enter setup mode
when the vehicle is moving
324.10 Detailed Example(3)
- GPS-base Automotive Navigation Assistant (GANA)
- 3.2 In setup mode, the system displays a map.
The default map is in125000 scale and is
centered on the user's current position. At this
scale, the map covers a square with 2.5 km sides
(6.25 km2). Maps are oriented so true north is at
the top. - 3.3 When the user's current position is within
the visible range pf the map. The system always
indicates it with a red arrow. The arrow points
in the direction the user is heading. - 3.4 The system also displays in orange (
computed in real time) the shortest route (in
estimated travel time) from the current position
to the center of the map. It will not be possible
to display the entire route if the current
position is not displayed. - 3.5 When the user manipulates the trackball, the
screen scrolls the map in the direction of
rotation if the trackball, as if the user were
grabbing the map.
334.10 Detailed Example(4)
- GPS-base Automotive Navigation Assistant (GANA)
- 3.6. The LCD screen displays the labels Zoom
Out, Zoom In, Go Current, Go destination,
Set destination and Navigate above the six
buttons (from left to right). The buttons work as
follows - Zoom In and Zoom Out display new maps. The scale
of the map appears at the top right of the
screen. There may be a delay retrieving a map, in
which case the system displays a message
Retrieving map. If the map or network is
unavailable for any reason, the system displays
Sorry. Map not available - When the user presses Zoom In, the map scale is
doubled so a smaller region is displayed, with
more local detail. The maximum scale is 13125,
means the map covers an area with 312.5 m sides
(about 100,000 m2). If this scale is displayed,
the Zoom In button is inoperative and its label
appears in light gray.
344.10 Detailed Example(5)
- GPS-base Automotive Navigation Assistant (GANA)
- When the user presses Zoom Out, the map scale is
divided by 2 so a larger region is displayed,
with less local detail. The minimum scale is
1102,400,000, which means the map covers an area
with sides pf approximately 10.000 km. If this
scale is displayed, the Zoom Out button is
inoperative and its label appears on light gray.
Note that the scales are only approximate die to
spherical aberration. - When the user presses Set Destination, the
location at the center of the screen (marked by
the end of the orange route) is set as the
destination. The shortest route from the current
position to the destination is highlighted in red
and is adjusted as the car moves. - The shortest route to the set destination (red)
is shown on top of the shortest route to the
center of the screen (orange), and hence has
precedence. - When the user presses Go Current, the map jumps
so it is centered over the current location.
354.10 Detailed Example(6)
- GPS-base Automotive Navigation Assistant (GANA)
- When the user presses Go Destination, the map
jumos so it is centerd over the destination. If
no destination has been set, The destination
defoults to the current location. - When the user presses Navigate or the vehicle
starts moving, the system enters navigation mode
described bellow. - 4. Navigation mode
- 4.1 A detailed map is never displayed in
navigation mode since the user would not be able
to concentrate on driving while looking at the
map. - 4.2 In no destination has been set, the system
just displays the name of the cirrent highway or
street and municipality in large font. - 4.3 In addition if a destination has been serm
the system displays the following in a very large
font - An arrow ponting up if the driver sgiuld do, in
the follokwing formatTurn ltturning directiongt
at ltturning landmarkgt and lthead heading
directiongt on ltroad identificationgt towards
ltnext landmarkgt.
364.10 Detailed Example(7)
- GPS-base Automotive Navigation Assistant (GANA)
- The destination municipality (or address if
within), the distance remaining, the expected
tome remaining and the expected arrival time - 4.4 The turning arrows and instructions are
displayed as soon as possible as long as they
cannot be interpreted ambiguously. So, for
example a left turn would only appear when the
driver must tale the next left turn. - 4.5 The system displays the labels Speak Now,
Volume Up, Volume Down, Guide On, Guide Off and
Setup above the six buttons (from left to right).
The buttons work as follows - Speak Now Produces a computer-generated voice,
reading the instructions that are on display.
Every time the user presses the button. Any
reading in progress is cancelled and the
instructions are immediately read again starting
from the beginning - Volume Up and Volume Down adjust sound output.
374.10 Detailed Example(8)
- GPS-base Automotive Navigation Assistant (GANA)
- Speak Now Produces a computer-generated voice,
reading the instructions that are on display.
Every time the user presses the button. Any
reading in progress is cancelled and the
instructions are immediately read again starting
from the beginning - Volume Up and Volume Down adjust sound output.
- Guide On causes a computer-generated voice to
automatically read the instructions one minute in
advance of any requited driver action, such as
exiting the highway, being needed. Guide Off
cancels this function the user would have to
read the screen or press Speak Now. In situations
where navigational action is required more
frequently than once a minute, the voice reads
the next instructions as soon as the system
detects that the driver has responded to the
previous instructions. - Setup switches to setup mode if the car is
stationary. If the car is not stationary, the
Setup button is grayed out and is inactive.
384.10 Detailed Example(9)
- GPS-base Automotive Navigation Assistant (GANA)
- 4.6 If the driver does not respond as expected
to the instructions, and takes a different
route, the system immediately calculates a new
route. - E. Non-functional requirements.
- 1. The system will be robust in the case of
failure of the Internet connection or failure to
receive the GPS signal, maintaining whatever
service it can. - 2. The system will be designed in a flexible way
such that changes in wireless Internet or GPS
technology can be incorporated in future
releases. - 3. The system will be designed anticipating
incorporation of input from an inertial
navigation unit that would take over in cases
where GPS signals fail.
394.13 Difficulties and Risks in Domain and
Requirements Analysis
- Lack of understanding of the domain or the real
problem - Do domain analysis and prototyping
- Requirements change rapidly
- Perform incremental development, build
flexibility into the design, do regular reviews - Attempting to do too much
- Document the problem boundaries at an early
stage, carefully estimate the time - It may be hard to reconcile conflicting sets of
requirements - Brainstorming, JAD sessions, competing prototypes
- It is hard to state requirements precisely
- Break requirements down into simple sentences and
review them carefully, look for potential
ambiguity, make early prototypes