Lecture 4 - (System Modeling)
Lecture 4 - (System Modeling)
System Modeling
Abdisalam Issa-Salwe
Shari Lawrence Pfleeger and Joanne M. Atlee (2009): ,Software Engineering: Theory and Practice, 4 th E.. Pearson
Contents
The Requirements Process
Requirements Elicitation
Types of Requirements
Characteristic of Requirements
Modeling Notations
Requirements and Specification Languages
Prototyping Requirements
Requirements Documentation
Validation and Verification
Measuring Requirements
Choosing a Specification Technique
Information System Example
Real Time Example
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
1
Objectives
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
2
4.1 The Requirements Process
Sidebar 4.1 Why Are Requirements Important?
Top factors that caused project to fail
Incomplete requirements
Lack of user involvement
Unrealistic expectations
Lack of executive support
Changing requirements and specifications
Lack of planning
System no longer needed
Some part of the requirements process is involved in
almost all of these causes
Requirements error can be expensive if not detected early
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
3
4.2 Requirements Elicitation
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
4
4.2 Requirements Elicitation
Means of Eliciting Requirements
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
5
4.3 Types of Requirements
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
6
4.3 Types of Requirements
Resolving Conflicts
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
7
4.4 Characteristics of Requirements
Correct
Consistent
Unambiguous
Complete
Feasible
Relevant
Testable
Traceable
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
8
4.5 Modeling Notations
Entity-Relationship Diagrams (continued)
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
9
4.5 Modeling Notations
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
10
4.5 Modeling Notations
UML Class Diagram (continued)
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
11
4.5 Modeling Notations
Event Traces Example: Message Sequence Chart
An enhanced event-trace notation, with
facilities for creating and destroying entities,
specifying actions and timers, and
composing traces
Verticalline represents a participating entity
A message is depicted as an arrow from the
sending entity to the receiving entity
Actions are specified as labelled rectangles
positioned on an entity's execution line
Conditions are important states in an entity's
evolution, represented as labelled hexagon
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
12
4.5 Modeling Notations
State Machines (continued)
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
13
4.5 Modeling Notations
UML Statechart Diagrams (continued)
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
14
4.5 Modeling Notations
Data-Flow Diagrams (continued)
Advantage:
Provides an intuitive model of a proposed
system's high-level functionality and of the
data dependencies among various processes
Disadvantage:
Can be aggravatingly ambiguous to a
software developer who is less familiar with
the problem being modeled
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
15
4.5 Modeling Notations
Functions and Relations
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
16
4.5 Modeling Notations
Logic
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
17
4.5 Modeling Notations
Logic Example: Object Constrain Language (OCL)
A constrain language that is both mathematically
precise and easy for non-mathematicians to read,
write, and understand
Designed for expressing constrains on object
models, and expressing queries on object type
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
18
4.6 Requirements and Specification Languages
Specification and Description Language (SDL)
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
19
4.7 Prototyping Requirements
Prototyping Example
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
20
4.7 Prototyping Requirements
Prototyping Example (continued)
Third prototype shows that instead of calendar, the user
is presented with three slide bars
User uses the mouse to slide each bar left or right
The box at the bottom of the screen changes to show
the selected day, month, and year
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Throwaway approach
Developed to learn more about a problem or a proposed
solution, and that is never intended to be part of the
delivered software
Allow us to write “quick-and-dirty”
Evolutionary approach
Developed not only to help us answer questions but also
to be incorporated into the final product
Prototype has to eventually exhibit the quality
requirements of the final product, and these qualities
cannot be retrofitted
Both techniques are sometimes called rapid
prototyping
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
21
4.7 Prototyping Requirements
Prototyping vs. Modeling
Prototyping
Good for answering questions about the user
interfaces
Modeling
Quickly answer questions about constraints
on the order in which events should occur, or
about the synchronization of activities
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
22
4.8 Requirements Documentation
Requirements Specification: Steps Documenting Process
Describe all inputs and outputs in detail, including
the sources of inputs
the destinations of outputs,
the value ranges
data format of inputs and output data
data protocols
window formats and organizations
timing constraint
Restate the required functionality in terms of the
interfaces' inputs and outputs
Devise fit criteria for each of the customer's quality
requirements
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
23
4.8 Requirements Documentation
Sidebar 4.7 Hidden Assumptions
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
24
4.9 Validation and Verification
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
25
4.10 Measuring Requirements
Measurements focus on three areas
product
process
resources
Number of requirements can give us a sense of the size
of the developed system
Number of changes to requirements
Many changes indicate some instability or uncertainty
in our understanding of the system
Requirement-size and change measurements should be
recorded by requirements type
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Applicability Veriability
Implementability Run time safety
Testability/Simulation Tools maturity
Checkability Looseness
Maintainability Learning curve
Modularity Technique maturity
Level of abstraction Data modeling
Soundness Discipline
26
4.11 Choosing a Specification Technique
Steps
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
27
Group discussion
Department of Computer Science, Faculty of Information Science and Technology, East Africa University
28