CS223: Software Engineering Lecture 7: Requirement Engineering.
02 Requirement Engineering
Transcript of 02 Requirement Engineering
-
8/8/2019 02 Requirement Engineering
1/51
Analyse User Requirements
-
8/8/2019 02 Requirement Engineering
2/51
Performance Objectives
Outline fundaments of requirement
engineering
Analyse systems and models
-
8/8/2019 02 Requirement Engineering
3/51
Software Engineering
Analyse User Requirements
Outline fundamentals of requirement
engineering
-
8/8/2019 02 Requirement Engineering
4/51
Objectives
Enable you to
Why and what requirement engineering is for in
software system development
Organise system requirements for clients, usersand developers
Describe system validation
Discuss impact on system life cycle with changes in
requirements
-
8/8/2019 02 Requirement Engineering
5/51
Requirements Engineering
Definition:
the process of establishing the services the system
should provide and the constraints under which it
must operate.
Why?
A systematic process is used to derive a definition
of the software system
-
8/8/2019 02 Requirement Engineering
6/51
Problems
A failure to make clear separation between the
different levels of description
Why different level?Why different level?
This is useful as they communicateThis is useful as they communicate
information about the system to different typesinformation about the system to different types
of readerof reader
-
8/8/2019 02 Requirement Engineering
7/51
Readers of the Requirements
Requirementdefinition
Client managers
System end-users
Client engineers
Contractor managers
System architects
System end-users
Client engineers
System architects
Software developers
Contractor managers
System architects
Software developers
Requirement
specification
Software
specification
Targeted at a managerial levelTargeted at a managerial level
Targeted at senior technicalTargeted at senior technical
staff & project managersstaff & project managers
ImplementationImplementation--orientedoriented
document for software engineersdocument for software engineers
-
8/8/2019 02 Requirement Engineering
8/51
Levels of Requirement
Requirement definition
A statement of what services the system is
expected to provide and the constraints under
which it must operate Requirement specification
A structured document which sets out the system
services in detail
Software specification An abstract description of the software which is a
basis for design and implementation; add further
detail to the requirement specification
-
8/8/2019 02 Requirement Engineering
9/51
System requirements should set out whatthe
system should do rather than howthis is done
A requirement may be
Functional system service or function
Non-functional constraints
-
8/8/2019 02 Requirement Engineering
10/51
Example
Requirement definition
The software must provide a means of representing and accessing
external files created by other tools
Requirement specification
1. The user should be provided with facilities to define the type of
external files
2. Each external files type may have an associated tool which
may be applied to the file
3. Each external file may be represented as a specific icon on the
users display
-
8/8/2019 02 Requirement Engineering
11/51
Requirements Engineering Process
A set of activities that lead to the
production of the requirements definition
and requirements specification.
4 principal stages:
Feasibility study
Requirements analysis
Requirements definition
Requirements specification
-
8/8/2019 02 Requirement Engineering
12/51
The 4 principal stages
Feasibility study
inform the decision whether to go ahead with a more detailed
analysis
Requirements analysis
process of deriving the system requirements through
observation, discussions, task analysis, etc. Involve the
development of system models.
Requirements definition
activity of translating the information gathered into a set ofrequirements.
Requirements specification
sets out a detailed & precise description of the system
requirements
-
8/8/2019 02 Requirement Engineering
13/51
Software requirements document
Includes requirements definition &requirements specification
Set out what the system should do without
specifying how it should be done Enable trace ability between these
requirements and the final system design
Complete, consistent, no conflict
May also include hardware and databaserequirements
-
8/8/2019 02 Requirement Engineering
14/51
Requirements validation
Concerned with showing that the requirementsactually define the system that the customerwants
If inadequate, errors propagated to the systemdesign & implementation leads to expensivesystem modification at later stage to correct
problems.
-
8/8/2019 02 Requirement Engineering
15/51
Several aspects which must be checked: Validity
Consistency
Completeness
Realism
Techniques: Prototyping
Regular Requirements review Checks for consistency, completeness, verifiability,
comprehensibility, traceability, adaptability.
-
8/8/2019 02 Requirement Engineering
16/51
Requirements Evolution
Non-functional requirements are particularly affectedby changes in hardware technology
The requirements document should always be
updated so that it is an accurate reflection of the
system implementation
Initialunderstanding
of problem
Initialrequirements
Changedunderstanding
of problem
Changedrequirements
time
-
8/8/2019 02 Requirement Engineering
17/51
Software Engineering
Analyze User Requirements
Analyze Systems and Models
-
8/8/2019 02 Requirement Engineering
18/51
Objectives
Enable you to
Describe various approaches to analyzing current
systems and to elicit user requirements
Explain the role of system models Illustrate different types of system models
Explain the idea of a data dictionary
Produce a simple user requirement for a system
-
8/8/2019 02 Requirement Engineering
19/51
Requirement Analysis Process
Requirement analysis is an iterative process
which involves
Requirements discovery
Requirements classification & organisation
Requirements prioritization & negotiation
Requirements documentation
-
8/8/2019 02 Requirement Engineering
20/51
Requirement Analysis Process
-
8/8/2019 02 Requirement Engineering
21/51
System models
One widely used technique to document systemspecification
Graphical representations that describe businessprocesses, the problem to be solved and the system
that is to be developed Bridge between the analysis and design processes
An abstraction of the system being studied rather thanan alternative representation of that system
Different types of system models are based on differentapproaches to abstraction
-
8/8/2019 02 Requirement Engineering
22/51
Types ofSystem Models
A composition model
Shows how some entities in the system are composed of
other entities
A data-flow model
shows how data is processed at different stages
A classification model
Shows how entities have common characteristics
A stimulus-response model
Shows how the system reacts to internal and externalevents
An architectural model
Shows the principal sub-systems that make up a system
-
8/8/2019 02 Requirement Engineering
23/51
Class Activity
Entity-Relation diagram
Data-Flow diagram
Class diagram
For each diagram above:
1. Describe briefly its purpose
2. State the notations used
-
8/8/2019 02 Requirement Engineering
24/51
Composition Model
Software systems make use of large databaseof information.
Important to define logical form of the data
processed by the system. Using relational model with data structure
specified as a set of tables.
Technique: Entity-Relation (ER) Diagram
-
8/8/2019 02 Requirement Engineering
25/51
Entity-Relation Diagram
A detailed, logical representation of the data
for an organization or for a business
application.
Sets out data entities and relations betweenthese entities. Entities can have attributes
which are atomic and not decomposed.
-
8/8/2019 02 Requirement Engineering
26/51
Notations
Entity a business object about which you wantto collect data
Attribute a characteristic of an entity
Primary Key attribute(s) that assumes a uniquevalue for each entity instance
Relationship a meaningful association betweenentities with cardinality
-
8/8/2019 02 Requirement Engineering
27/51
Example
Entity Employee Department
AttributesName, age, ic number,
gender, addressCode, Name
Identification Key IC number Code
Relationship
An EMPLOYEE is
assigned in one
DEPARTMENT
A DEPARTMENT has
one or more
EMPLOYEES
-
8/8/2019 02 Requirement Engineering
28/51
Example - ERD
EMPLOYEE DEPAR TMENTASSIGN / HAS
name
age
ic number
gender address
code name
-
8/8/2019 02 Requirement Engineering
29/51
Exercise
Produce an ER Diagram for the following scenario:
Students take courses in the university.
The courses are run by departments.
It is possible for a course to be run by more than onedepartment.
Each course consists of a number of units.
Lecturers teach the units, and in some circumstances morethan one lecturer will teach a unit.
Lecturers, of course teach more than one unit.
Since the introduction of modular courses, it is possible for
one unit to be included on more than one course.
A lecturer may be a course leader for a particular course.
-
8/8/2019 02 Requirement Engineering
30/51
Answer
STUDENT DEPARTMENTASSIGN / HAS
name
age
Ic number
gender address
code name
-
8/8/2019 02 Requirement Engineering
31/51
Data Flow Model
Models business processes of a system
Shows how data is processed by a system at
different stages
Technique: Data Flow Diagrams
-
8/8/2019 02 Requirement Engineering
32/51
Data Flow Diagram
A technique used to show graphically
the flow of data through a business system and
the processes performed by the system.
-
8/8/2019 02 Requirement Engineering
33/51
Processing step
Accepts input data & transforms it into output data
Data Flow
A path that the data takes in moving from one component ofthe system to another
Data store
where the system stores data because other processesneed to use them later
Entity
A person, department, organisation or other informationsystem that provides data to or receives output from system
Data name
Entity name
Notations
Process
Data store
-
8/8/2019 02 Requirement Engineering
34/51
DFD Rules
Every Process must haveincoming & outgoing data flow
A process can have more thanone incoming or outgoing dataflow
A process can be connected to
any other symbols by usingdata flows
Process
Process
ProcessProcess
-
8/8/2019 02 Requirement Engineering
35/51
A data flow must have a processsymbol on at least one end
A data store must be connected to aprocess with a data flow
Every data store must have at leastone incoming & one outgoing data
flow
ProcessProcess
Process
-
8/8/2019 02 Requirement Engineering
36/51
Example - DFD
A Fast Food Ordering System
accept the order from Customerand
generate receipt forCustomer,
send order to the Kitchen, and
at the same time, update the related files in order to
generate useful reports to the Branch Manager
-
8/8/2019 02 Requirement Engineering
37/51
Context Diagram
Customer
BranchManager
Kitchen
P
FastFoodOrdering
System
Order
Daily Reports
Receipt
Food Order
-
8/8/2019 02 Requirement Engineering
38/51
Level 1 - Diagram 0
Customer
BranchManager
KitchenP1
ProcessCustomer
Order
Order
DailyReports
Receipt
Food Order
P2
UpdateItem Sold
File
P3
UpdateInventory
File
P4
GenerateDaily
Reports
D1 Item Sold File D2 Inventory File
Item Data Inventory Data
Sold Item List Inventory Data
Sales Information
Inventory Information
-
8/8/2019 02 Requirement Engineering
39/51
Level 2 - Diagram 1
P1.1
AcceptOrder
Order
Receipt
Food Order
P1.3
PrintReports
P1.4
GenerateSold Item
List
P1.5
GenerateInventory
Sold Item List
P1.2
SendOrder ToKitchen
Order
OrderOrder
Order
Inventory Data
-
8/8/2019 02 Requirement Engineering
40/51
Level 2 - Diagram 4
P4.1
EvaluateGathered
Information
Business Information
P4.2Generate
SalesStatistics
P4.3Produce
DailyReports
Inventory Data Sold Item List
Inventory Information Sales Information
Daily Reports
-
8/8/2019 02 Requirement Engineering
41/51
Exercise
The level 1 diagram (shown in next slide) shows the
data movement in a traveling agency. Study the
diagram carefully and determine the errors in the
diagram
List the errors
Redraw the diagram and label the data flows so that it is
correct. You may have to cut down any replications and
duplications
-
8/8/2019 02 Requirement Engineering
42/51
PrivateTravel
Agency
Tourist
CashPaymentTourist
1
CheckCredit
3
MakeReservation
2
DetermineDesired
Tour
D1 Tour Fee
D3 Travel Brochure
AirlineAgency
Tourist withCredit Card
D2 Credit History
-
8/8/2019 02 Requirement Engineering
43/51
3
MakePayment
Answer
Private
TravelAgency
Tourist
4
CheckCredit
2
MakeReservation
1
DetermineDesired
Tour
D1 Tour FeeD3 Travel Brochure
AirlineAgency
D2 Credit History
-
8/8/2019 02 Requirement Engineering
44/51
Classification Model
Shows how entities have common
characteristics
Called Object models
Shows how entities in the system may be
classified and composed of other entities.
They model classes of objects representing
real-world entities.
-
8/8/2019 02 Requirement Engineering
45/51
Object Class/Inheritance
An object class
an abstraction over a set of objects which identifies
common attributes and the services or operations
which are provided by each object.
Class name
Attributes
Services
Notations
An object class is divided into three parts:
Class namename of the object class
Attributeslists the attributes of that object
class.
Services - the operations associated with the
object.
-
8/8/2019 02 Requirement Engineering
46/51
Taxonomy
These classes of object are then organized
into a taxonomy.
a classification scheme which shows how an object
class is related to other classes through commonattributes and services.
To display this taxonomy,
classes are organized into an inheritance or class
hierarchy
the most general object classes at thetop of class hierarchy.
More specialized objects inherit their attributes and
services. These specialized objects may have their
own attributes and services.
-
8/8/2019 02 Requirement Engineering
47/51
Example
Figure
Location
Line color
ClosedF
igureArea
Fill color
OpenF
igureLength
LineEllipse
Eccentricity
Polygon
No. of sides
Circle
Radius
Rectangle
Length
Width
Triangle
Base
Height
x
y
-
8/8/2019 02 Requirement Engineering
48/51
-
8/8/2019 02 Requirement Engineering
49/51
-
8/8/2019 02 Requirement Engineering
50/51
Data Dictionaries
Also known as Catalog or Repository
Stores the metadata (data about data) of a businessinformation system
A list of names used by the system arranged
alphabetically. Stores information about business entities and their
relationships with one another (business rules),attributes of entities, primary and foreign keys,validation rules and triggers.
-
8/8/2019 02 Requirement Engineering
51/51
Example
Name Description Type Date
has_labels 1:N relation between entities of type
Node or Link and entities of type Label
Relation 5.10.93
Label Holds structured or unstructured
information about nodes or links. Labels
can be text or can be an icon.
Entity 8.12.93
Link Represents a relation between design
entities represented as nodes. Links are
typed and may be named.
Relation 8.12.93
name (label) Each label has a name which identifies
the type of label. The name must be
unique within the set of label types used
in a design.
Attribute 8.12.93
name (node) Each node has a name which must be
unique within a design. The name may be
up to 64 characters long.
Attribute 15.11.93