W6-Lecture 11&12 - Requirement Modeling
W6-Lecture 11&12 - Requirement Modeling
Concepts
Lecture 11&12
Requirements Modelling
04/30/2024 CSC291 - Software Engineering Concepts 2
Outline
Requirement Modelling
Requirement Analysis
Requirements analysis
Specifies software’s operational characteristics
Indicates software's interface with other system elements
Establishes constraints that software must meet
Rule of Thumb
The model should focus on requirements that are visible
within the problem or business domain. The level of
abstraction should be relatively high.
Each element of the analysis model should add to an
overall understanding of software requirements and
provide insight into the information domain, function and
behavior of the system.
Delay consideration of infrastructure and other non-
functional models until design.
Minimize coupling throughout the system.
Be certain that the analysis model provides value to all
stakeholders.
Keep the model as simple as it can be.
04/30/2024 CSC291 - Software Engineering Concepts 5
Domain Analysis
Software domain analysis is the identification, analysis, and
specification of common requirements from a specific
application domain, typically for reuse on multiple projects
within that application domain . . .
Domain Analysis
Define the domain to be investigated.
Collect a representative sample of applications in the
domain.
Analyze each application in the sample.
Develop an analysis model for the objects.
04/30/2024 CSC291 - Software Engineering Concepts 7
Requirement Modelling
• The intent of the analysis/requirement model is to provide a description
to build.
• Other stakeholders understand more about what they really require.
Requirement Modelling
04/30/2024 CSC291 - Software Engineering Concepts 9
Scenario-based Modelling
• The scenarios often called use cases, proved a
description of how the system will be used.
• In essence, a use case tells a stylized story about how an
end user interacts with the system under a specific set of
circumstances.
• The story can be a narrative text, an outline of tasks or
interactions, a template-based description, or a
diagrammatic representation.
04/30/2024 CSC291 - Software Engineering Concepts 10
system name
ATM System system boundary
primary actor
1
secondary actor
Withdraw
Money
2
Bank Deposit
Customer Money
Customer
Accounts
Database
role 3
Transfer
Money
association
<<Customer
4 Accounts
Check Database>>
use case Balance
alternative actor
notation
stereotype
04/30/2024 CSC291 - Software Engineering Concepts 13
Class-based Modelling
• It shows the classes of the system, their inter-
model
04/30/2024 CSC291 - Software Engineering Concepts 14
Class-based Modelling
Class-based modeling represents:
Objects that the system will manipulate
Operations (also called methods or services) that will be applied
to the objects to effect the manipulation
Relationships (some hierarchical) between the objects
Collaborations that occur between the classes that are defined.
Identifying Classes
Examining the usage scenarios developed as part of the
requirements model and perform a "grammatical parse“.
Classes are determined by underlining each noun or noun
phrase and entering it into a simple table.
Synonyms should be noted.
If the class (noun) is required to implement a solution, then it is
part of the solution space; otherwise, if a class is necessary only
to describe a solution, it is part of the problem space.
But what should we look for once all of the nouns have
been isolated?
04/30/2024 CSC291 - Software Engineering Concepts 16
Class
Class Name
operations
04/30/2024 CSC291 - Software Engineering Concepts 18
Class Attributes
Person
An attribute is a named property of a
name : String class that describes the object being
address : Address modeled.
birthdate : Date In the class diagram, attributes appear
CNIC : Id in the second compartment just below
the name-compartment.
04/30/2024 CSC291 - Software Engineering Concepts 19
Class Operations
Person
name : String
address : Address
birthdate : Date
CNIC : Id
eat Operations describe the class behavior
sleep and appear in the third compartment.
work
play
04/30/2024 CSC291 - Software Engineering Concepts 20
Behavioral Modelling
• State Diagram is a type of behavioral model
• Depicts data and behavior of a single object throughout its
lifetime.
• Elements of State Diagram
• Set of states (including an initial start state)
• Transitions between states
• Entire diagram is drawn from that object's perspective
04/30/2024 CSC291 - Software Engineering Concepts 22
States
• State: Conceptual description of
the data in the object
• Represented by object's field
values
• Entire diagram is drawn from the
central object's perspective
• Only include states / concepts that
this object can see and influence
• Don't include every possible value
for the fields; only ones that are
conceptually different
04/30/2024 CSC291 - Software Engineering Concepts 23
Example Scenario
• I want to keep my valuables in safe that’s hard to find.
So to reveal the lock to the safe, I have to remove a
strategic candle from its holder, but this will reveal the
lock only when the door is closed.
• Once I can see the lock I can insert my key to open
the safe. For extra safety, I make sure that I can open
the safe only I replace the candle first. If a thief
neglects this precaution, I ‘ll unleash the nasty
monster to devour him.
04/30/2024 CSC291 - Software Engineering Concepts 24
State Diagram
04/30/2024 CSC291 - Software Engineering Concepts 25
Chapter Reading
Chapter 6: Requirement Modelling
by “Software Engineering- A Practitioner's Approach”
(Book and Lecture Slides are already uploaded on resource
link.)
Resource Link:
https://sites.google.com/cuilahore.edu.pk/sec