Software Development - L02
Software Development - L02
2023
1
Outline
► Requirements developing
► What is the Algorithm?
► What is the Algorithm Properties?
► How we measure the complexity ?
► Asymptotic Notation?
2
Requirements developing
3
Why so difficult?
► Different “worlds”
► knowing what should be done vs knowing to let a
computer do that
► Users/stakeholders are not an uniform group
► conflict between cost and usability / performance /
features
► conflicting demands from different departments
► Getting the good (ideal) system vs possibility building it
good
Interaction….match
4
Requirements Example
5
Requirements imprecision
6
Requirements completeness and consistency
► Complete
► They should include descriptions of all facilities
required.
► Consistent
► There should be no conflicts or contradictions in the
descriptions of the system facilities.
► In practice, it is impossible to produce a complete and
consistent requirements document.
7
RE Process and Related Activities
8
Users of a requirements document
9
Requirement Elicitation Techniques
► Interviews
Structured (closed) interviews
Non-structured (open) interviews
One-to-one interviews
Group interviews
► Surveys
► Questionnaires
10
Requirements categorized logically
► Must Have :
Software cannot be said operational without them.
► Should have :
Enhancing the functionality of software.
► Could have :
Software can still properly function with these
requirements.
► Wish list :
These requirements do not map to any objectives of
software.
11
Requirement Engineering Process
► Feasibility Study
► Requirement Gathering
► Requirement Specification
► Requirement Validation
12
Feasibility study
13
Types of requirement
► Business Requirements:
the scope of the project and identify stakeholders
► User requirements
► concern the user goals of the system
► Statements in natural language plus diagrams of the
services the system provides and its operational
constraints. Written for customers.
14
Types of requirement
System requirements
► define functional and non-functional (or quality)
requirements.
► A structured document setting out detailed descriptions of
the system‟s functions, services and operational
constraints. Defines what should be implemented so may
be part of a contract between client and contractor.
15
Example
16
Example
17
System requirements Types
► Functional requirements
Statements of services the system should provide,
how the system should react to particular inputs and
how the system should behave in particular situations.
► Non-functional requirements
Constraints on the services or functions offered by the
system such as timing constraints, constraints on the
development process, standards, etc.
► Domain requirements
Constraints on the system from the domain of
operation
18
Functional requirements
19
Functional requirements Example
20
Non-functional requirements
21
Non-functional requirements implementation
22
Types of nonfunctional requirement
23
Non-functional classifications
► Product requirements
Requirements which specify that the delivered product
must behave in a particular way e.g. execution speed,
reliability, etc.
► Organizational requirements
Requirements which are a consequence of
organizational policies and procedures e.g. process
standards used, implementation requirements, etc.
► External requirements
Requirements which arise from factors which are
external to the system and its development process
e.g. interoperability requirements, legislative
requirements, etc.
24
Examples of nonfunctional requirements
► Product requirement
The system shall be available to all clinics during normal
working hours (Mon–Fri, 0830–17.30). Downtime within
normal working hours shall not exceed five seconds in any
one day.
► Organizational requirement
Users of the system shall authenticate themselves using
their health authority identity card.
► External requirement
The system shall implement patient privacy provisions as
set out in HStan-03-2006-priv.
25
Usability requirements Example
26
Metrics for specifying nonfunctional requirements
27
Domain requirements
28
Train protection system Example
29
Domain requirements problems
► Understandability
Requirements are expressed in the language of the
application domain;
This is often not understood by software engineers
developing the system.
► Implicitness
Domain specialists understand the area so well that
they do not think of making the domain requirements
explicit.
30
The software requirements document
31
Problem Identification & Requirements Specification
► Answering question:
What problem is being solved?
► 10-25% of life cycle should be spent here
E.g., Expected software or application life is 10 years
1 to 2.5 years in this phase
► Techniques
Partitioning: Divide and conquer
Parts & relationships
Abstraction: Defining in general terms
Leaving out details
Projection: Viewing problem from different perspectives
User perspective, programmer perspective, maintainer
perspective
Many other techniques
E.g., data flow diagrams
32
Banking ATM system Example
33
Requirements document variability
34
The structure of a requirements document
Chapter Description
Preface This should define the expected readership of the document and
describe its version history, including a rationale for the creation of a
new version and a summary of the changes made in each version.
Introduction This should describe the need for the system. It should briefly describe
the system‟s functions and explain how it will work with other systems.
It should also describe how the system fits into the overall business or
strategic objectives of the organization commissioning the software.
Glossary This should define the technical terms used in the document. You
should not make assumptions about the experience or expertise of the
reader.
User requirements Here, you describe the services provided for the user. The
definition nonfunctional system requirements should also be described in this
section. This description may use natural language, diagrams, or other
notations that are understandable to customers. Product and process
standards that must be followed should be specified.
System architecture This chapter should present a high-level overview of the anticipated
system architecture, showing the distribution of functions across
system modules. Architectural components that are reused should be
highlighted.
35
The structure of a requirements document
Chapter Description
System This should describe the functional and nonfunctional requirements in more
requirements detail. If necessary, further detail may also be added to the nonfunctional
specification requirements. Interfaces to other systems may be defined.
System models This might include graphical system models showing the relationships between
the system components and the system and its environment. Examples of
possible models are object models, data-flow models, or semantic data models.
System evolution This should describe the fundamental assumptions on which the system is
based, and any anticipated changes due to hardware evolution, changing user
needs, and so on. This section is useful for system designers as it may help
them avoid design decisions that would constrain likely future changes to the
system.
Appendices These should provide detailed, specific information that is related to the
application being developed; for example, hardware and database descriptions.
Hardware requirements define the minimal and optimal configurations for the
system. Database requirements define the logical organization of the data used
by the system and the relationships between data.
Notation Description
Natural language The requirements are written using numbered sentences in natural
language. Each sentence should express one requirement.
Structured natural The requirements are written in natural language on a standard form or
language template. Each field provides information about an aspect of the
requirement.
Design description This approach uses a language like a programming language, but with
languages more abstract features to specify the requirements by defining an
operational model of the system. This approach is now rarely used although
it can be useful for interface specifications.
Graphical notations Graphical models, supplemented by text annotations, are used to define the
functional requirements for the system; UML use case and sequence
diagrams are commonly used.
Mathematical These notations are based on mathematical concepts such as finite-state
specifications machines or sets. Although these unambiguous specifications can reduce
the ambiguity in a requirements document, most customers don‟t
understand a formal specification. They cannot check that it represents
what they want and are reluctant to accept it as a system contract
37
Example requirements for the insulin pump software system
38
A structured specification of a requirement for an insulin pump
39
A structured specification of a requirement for an insulin pump
40
Tabular specification of computation for an insulin pump
Condition Action
41
Stakeholders in the MHC-PMS
42
Scenarios
43
Example
44
Scenario: customer withdrawing money from ATM
45
In details
► Mohamed Hassan presses the "Withdraw Funds" button in ATM
► The ATM displays the preset withdrawal amounts (20, 100, and so on)
► Mohamed chooses the option to specify the amount of the withdrawal
► The ATM displays an input field for the withdrawal amount
► Mohamed indicates that he wishes to withdraw 500
► The ATM displays a list of Mohamed's accounts, a checking and two
savings accounts
► Mohamed chooses his checking account
► The ATM verifies that the amount may be withdrawn from his account
► The ATM verifies that there is at least 500 available to be disbursed
from the machine
46
Scenarios
47
Event scenario - start transaction
48
Scenario for collecting medical history in MHC-PMS
49
Scenario for collecting medical history in MHC-PMS
50
Requirements checking
51
Requirements validation techniques
► Requirements reviews
Systematic manual analysis of the requirements.
► Prototyping
Using an executable model of the system to check
requirements.
► Test-case generation
Developing tests for requirements to check testability.
52
Requirements management
53
Changing requirements
54
Changing requirements
► The business and technical environment of the system
always changes after installation.
New hardware may be introduced, it may be
necessary to interface the system with other systems,
business priorities may change (with consequent
changes in the system support required), and new
legislation and regulations may be introduced that the
system must necessarily abide by.
► The people who pay for a system and the users of that
system are rarely the same people.
System customers impose requirements because of
organizational and budgetary constraints. These may
conflict with end-user requirements and, after delivery,
new features may have to be added for user support if
the system is to meet its goals.
55
Requirements evolution
56
Requirements change management
57