Chapter 2 Requirements Analysis and Modeling
Chapter 2 Requirements Analysis and Modeling
Syllabus Content
Requirement Engineering
• The process of establishing the services that the customer requires from a system
What is Requirement ?
objective
Requirement Analysis
• Requirements analysis involves all the tasks that are conducted to identify the
needs of different stakeholders.
system design.
• This activity reviews all requirements and may provide a graphical view of the
entire system.
• Here, we may also use the interaction with the customer to clarify points of
• The context diagram is a simple model that defines the boundaries and interfaces
of the proposed systems with the external world.
• It identifies the entities outside the proposed system that interact with the system.
• One effective way to find out what the customer wants is to construct a prototype,
something that looks and preferably acts as part of the system they say they want.
• We can use their feedback to modify the prototype until the customer is satisfied
continuously.
• Some projects are developed for the general market. In such cases, the prototype
This process usually consists of various graphical representations of the functions, data
entities, external entities, and the relationships between them.
The graphical view may help to find incorrect, inconsistent, missing, and superfluous
requirements.
Such models include the Data Flow diagram, Entity-Relationship diagram, Data
After modeling the requirements, we will have a better understanding of the system
behavior.
Requirement Elicitation
and discovering the requirements of a system from users, customers, and other
stakeholders.
• Requirements elicitation is perhaps the most difficult, most error-prone and most
communication intensive software development.
Now we finalize the analyzed requirements, and the next step is to document these
requirements in a prescribed format.
There are a number of requirements elicitation methods. Few of them are listed below –
• Interviews
• Brainstorming
• Document Analysis
• Focus Groups
• Interface Analysis
• Observation
• Prototyping
• Requirements Workshops
• Survey/Questionnaire
1) Interviews:
2) Brainstorming Sessions:
• It is a group technique
• It is intended to generate lots of new ideas hence providing a platform to share
views
• A highly trained facilitator is required to handle group bias and group conflicts.
• Every idea is documented so that everyone can see it.
• Finally a document is prepared which consists of the list of requirements and their
priority if possible.
3) Survey:
• Leading a survey is an incredible method to find solutions to questions you can’t
answer by yourself.
• Questionnaires take into consideration data to be evoked from numerous
4) Prototyping
• Prototyping is a relatively latest procedure for gathering requirements.
• In this technique, you gather initial requirements for making a basic sort of
clarification – known as a prototype.
• Prototyping is a valuable device for business analysts to decide whether the solution
being created is actually what the stakeholder’s demand.
• Stakeholders can provide suggestions or changes on the prototypes before the plan
is implemented.
technology and can support stakeholders to imagine what the final product will
seem like.
5) Document Analysis
• This method is particularly significant when you are rolling out an improvement to
a current structure like an upgrade or change request.
• Document Analysis can act as beginning stages for brainstorming and interviews
topics.
1) The first step is to take time and do some research, have multiple discussion and
find out the business need of the project
2) Understanding of the business need will make sure that scope creep and gold
3) Make sure that you have chosen the right technique for requirement elicitation
4) The analyst must ensure that an adequate amount of stakeholders are added to the
project
5) Make sure that the stakeholders are actively engaging from the requirement phase
itself
3) Problems of volatility: The requirements change over time. The rate of change
the enterprise.
• Functional requirements
• Non-functional requirements
• Domain requirements
Functional Requirements
• These are the requirements that the end user specifically demands as basic
• These are requirements stated by the user which one can see directly in the final
product, unlike the non-functional requirements.
Non-Functional Requirements
These are basically the quality constraints that the system must satisfy according to
the project contract. The priority or extent to which these factors are implemented
varies from one project to other. They are also called non-behavioral requirements.
• Portability
• Security
• Maintainability
• Reliability
• Scalability
• Performance
• Reusability
• Flexibility
• Interface constraints
• Operating constraints
• Economic constraints
the functionality of the system, as well as the knowledge of the context within which
the system will operate
Domain Requirements
• The basic functions that a system of a specific domain must necessarily exhibit
come under this category.
the functionality of being able to access the list of faculty and list of students of
each grade is a domain requirement.
• These requirements are therefore identified from that domain model and are not
user specific.
etc.
• SRS serves as an input our other all documents created in later stages of software
• “Software” and “system” are sometimes used interchangeably as SRS. But, a software
Features of SRS
document.
• Ranked for importance and/or stability – Every requirement has its own
parameters.
• Traceable – Trace of any requirement up to its origin. Add reference to high level
Advantages of SRS
• It provides the basis for plan charter, work load, dependencies, etc.
Outline of SRS
1.1 Purpose
1.5 References
2. Overall Description
5.1.Performance requirements
5.2.Safety requirements
What is UML?
• UML is not a language in the same way that we view programming languages such
as ‘C++’, ‘Java’ or ‘Basic’.
• UML is however a language in the sense that it has syntax and semantics which
convey meaning, understanding and constraints to the reader and thereby allows
two people fluent in that language to communicate and understand the intention
of the other.
Why UML
• Provide users with a ready-to-use, expressive visual modeling language so they can
Structure diagrams show the static structure of the system and its parts on different
abstraction and implementation levels and how they are related to each other. The
4. Object Diagram
5. Package Diagram
Behavior diagrams
Behavior diagrams show the dynamic behavior of the objects in a system, which can be
described as a series of changes to the system over time, there are seven types of behavior
diagrams as follows:
5. Communication Diagram
6. Interaction Overview Diagram
7. Timing Diagram
• Illustrates the activities that are performed by the users of the system
• It is A scenario-based technique in the UML
• A sequence of actions a system performs that yields a valuable result for a particular
actor.
• It describe what a system does from the standpoint of an external observer. The
emphasis is on what a system does rather than how.
• Human
An actor is who or what initiates the events involved in the task of the use case. Actors are
simply roles that people or objects play
• The Use Case is Make Appointment. It is a use case for the medical clinic.
• The picture below is a Make Appointment use case for the medical clinic.
• The actor is a Patient. The connection between actor and use case is a
communication association (or communication for short).
• The use case task referred to as the use case that represents a feature needed in a
software system.
• The communication line to show how the actors communicate with the use case.
• A boundary rectangle is placed around the perimeter of the system to show how
Include Relationship
Represents the inclusion of the functionality of one use case within another
Arrow is drawn from the base use case to the used use case
Extend relationship
Arrow is drawn from the extension use case to the base use case
• Use cases are described using the language of the customer (language of the
domain which is defined in the glossary)
• Use cases provide a contractual delivery process (RUP is Use Case Driven)
• Use cases provide an easily-understood communication mechanism
• When requirements are traced, they make it difficult for requirements to fall through
the cracks
• Use cases provide a concise summary of what the system should do at an abstract
(low modification cost) level.
• Reuse at the class level can be hindered by each developer “taking a Use Case and
running with it”. Since UCs do not talk about classes, developers often wind up in a
vacuum during object analysis, and can often wind up doing things their own way,
making reuse difficult
Class Diagrams
• Class diagram is not only used for visualizing, describing, and documenting different
aspects of a system but also for constructing executable code of the software
application.
• Class diagram describes the attributes and operations of a class and also the
constraints imposed on the system.
• The class diagrams are widely used in the modeling of object oriented systems
because they are the only UML diagrams, which can be mapped directly with object-
oriented languages.
• Class diagrams are the most popular UML diagrams used for construction of
• Class diagram is basically a graphical representation of the static view of the system
• The name of the class diagram should be meaningful to describe the aspect of the
system.
• Use notes whenever required to describe some aspect of the diagram. At the end
• Finally, before making the final version, the diagram should be drawn on plain paper
• First of all, Order and Customer are identified as the two elements of the system.
They have a one-to-many relationship because a customer can have multiple orders.
• Order class is an abstract class and it has two concrete classes (inheritance
• The two inherited classes have all the properties as the Order class. In addition, they
have additional functions like dispatch () and receive ().
Example
Object Diagrams
• Object diagrams are derived from class diagrams so object diagrams are dependent
• The basic concepts are similar for class diagrams and object diagrams.
• Object diagrams are used to render a set of objects and their relationships as an
instance.
1. First, analyze the system and decide which instances have important data and
association.
2. Second, consider only those instances, which will cover the functionality.
Before drawing an object diagram, the following things should be remembered and
understood clearly −
• Objects and links are the two elements used to construct an object diagram.
After this, the following things are to be decided before starting the construction of
the diagram −
• The object diagram should have a meaningful name to indicate its purpose.
• Now the customer object (C) is associated with three order objects (O1, O2, and O3).
These order objects are associated with special order and normal order objects (S1,
S2, and N1). The customer has the following three orders with different numbers
• The customer can increase the number of orders in future and in that scenario the
object diagram will reflect that. If order, special order, and normal order objects are
observed then you will find that they have some values.
• For orders, the values are 12, 32, and 40 which implies that the objects have these
values for a particular moment (here the particular time when the purchase is made
is considered as the moment) when the instance is captured
• The same is true for special order and normal order objects which have number of
orders as 20, 30, and 60. If a different time of purchase is considered, then these
values will change accordingly.
Component Diagram
After identifying the artifacts, the following points need to be kept in mind.
• Use a meaningful name to identify the component for which the diagram is to be
drawn.
Example
Where to use
Deployment Diagram
system.
Package Diagram
• Packages are depicted as file folders and can be used on any of the UML diagrams.
diagram and Collaboration diagram. The basic purpose of both the diagrams are
similar.
receive messages.
• The purpose of interaction diagram is −
• To capture the dynamic behaviour of a system.
• To describe the message flow in the system.
• The following diagram shows the message sequence for SpecialOrder object and
the same can be used in case of NormalOrder object. It is important to understand
the time sequence of message flows. The message flow is nothing but a method
call of an object.
• The first call is sendOrder () which is a method of Order object. The next call
is confirm () which is a method of SpecialOrder object and the last call is Dispatch
• Method calls are similar to that of a sequence diagram. However, difference being
the sequence diagram does not describe the object organization, whereas the
collaboration diagram shows the object organization.
requirement. If the time sequence is important, then the sequence diagram is used.
If organization is required, then collaboration diagram is used.
• Statechart diagram is used to describe the states of different objects in its life cycle.
Emphasis is placed on the state changes upon some internal or external events.
These states of objects are important to analyze and implement them accurately.
• Statechart diagrams are very important for describing the states. States can be
• The first state is an idle state from where the process starts. The next states are
arrived for events like send request, confirm request, and dispatch order. These
events are responsible for the state changes of order object.
some problem in the system. When the entire life cycle is complete, it is considered
as a complete transaction as shown in the following figure. The initial and final state
4) Activity Diagram
• Activity diagram is basically a flowchart to represent the flow from one activity to
• Activity diagrams are mainly used as a flowchart that consists of activities performed
by the system. Activity diagrams are not exactly flowcharts as they have some
• Before drawing an activity diagram, we must have a clear understanding about the
elements used in activity diagram. The main element of an activity diagram is the
activity itself. An activity is a function performed by the system. After identifying the
activities, we need to understand how they are associated with constraints and
conditions.
• Activities
• Association
• Conditions
• Constraints
• an activity diagram for order management system. In the diagram, four activities are
identified which are associated with conditions. One important point should be
clearly understood that an activity diagram cannot be exactly matched with the
After receiving the order request, condition checks are performed to check if it is
normal or special order. After the type of order is identified, dispatch activity is
performed and that is marked as the termination of the process.
1) Timing Diagram
• Timing diagram shows the behavior of the objects in a given period of time.
• The differences between timing diagram and sequence diagram are the axes are
reversed so that the time are increase from left to right and the lifelines are shown
Example
• Customer Order
• Serve Product
• Collect Payment
• Produce Product
• Store Product
• Create a context level diagram identifying the sources and sinks (users).