Chapter 3 - Software Requirement and Structured Analysis
Chapter 3 - Software Requirement and Structured Analysis
Questionnaires:
A document with pre-defined set of objective questions
and respective options is provided to all stakeholders to
answer, which are collected and compiled later.
Problem of this technique is, if an option for some issue is
not mentioned in the questionnaire, the issue might be left
unattended.
Task Analysis:
• Team of engineers and developers may analyze the operation
for which the new system isrequired.
• Ifthe client already has some software to perform certain operation, it is
studied and requirements of proposed system are collected.
Domain Analysis:
Every software belongs to some domain category.
The expert people in the domain can help to analyze general and
specific requirements.
Brainstorming:
It is an informal debate held among various stakeholders and all their
inputs are recordedfor further requirementsanalysis.
Prototyping:
Prototyping will build user interface without adding detail functionality for
user to interpret the features of developing software.
It helps giving better idea of requirements.
If there is no software installed at client’s end for developer’s reference and
the client is not aware of its own requirements, the developer creates a
prototype based on initially mentioned requirements.
The prototype is shown to the client and the feedback is taken.
The client feedback serves as an input for requirement gathering.
Observation
Team of experts visits the client’s organization or workplace.
They observe the actual working of the existing systems.
They observe the workflow at client’s end and how execution problems
are dealt.
The team itself comes with some conclusions which aid to form
requirements expected from the software.
Summary of the Requirement Gathering Techniques
External entities describe the components that interact within the system. In
other words, define the sources and destinations of information that enter and
leave the system. An external entity represents persons, processes or
machines which produce data to be used by the system or receive data that is
output by the system. External entities are also known as terminators,
sources/sinks, and actors.
Examples of external entities include:
End User such as Student, Customer, Client
Purchasing Department
Inventory System
Process
• Process is a discrete action that transforms input data to output data. Process is known as data
transforms. The process is identified as follows:
• It shows data transformation or change. A process can only exist once on a data flow
diagram.
• All processes must have inputs and outputs. In other words, a process is asked to do
something and then must deliver.
• Each process is always "running" and ready to accept data.
• Major functions of processes are computations and making decisions.
• Each process should represent one function or action.
• A data process cannot input or output discrete event flows (i.e., a data process should not
control the system, it should do the work).
• A process name should start with an active verb (e.g., Produce Items, Control Production).
• Processes should generally move from top to bottom and left to right.
• For example, top level process would be Process 1.0 next level of detail Processes
Data stores are created to store information for later use.
They represent temporary or permanent repositories of
information that are inputs to or outputs of processes.
For example, a data store is needed to store data that is
generated on a daily basis but is required for a process that
runs weekly.1 Data stores are usually derived from the entities.
The data store creation must be as follow:
Data Store Data stores are named with an appropriate name, not to
include the word "file".
Only processes may connect with data stores.
There can be two or more systems that share a data store.
The name of the store as well as the number are recorded in
between lines as in figure:
Rules of DFD
Process
• No process can have only outputs (a miracle)
• No process can have only inputs (black hole)
• A process has a verb phrase label
Data Store
• Data cannot be moved directly from one
store to another
• Data cannot move directly from an outside
source to a data store
• Data cannot move directly from a data store
to a data sink
• Data store has a noun phrase (label)
Common mistakes in DFDs
Levels of DFD
Level 0 DFD or Context Diagram :
• Highest abstraction level DFD is known as Level 0 DFD.
• Shows the entire information system as one diagram.
• Level 0 DFDs are also known as context level DFDs.
Context Diagram
The context diagram is the highest level in a data flow diagram that
represents the entire system, it can also show the internal data flows within
a system which contains the following:
One process (which represents the entire system)
All sources/sinks (external entities)
Data flows linking the process to the sources and sinks (external entities)
DFD Rules— Context Diagram
• One process, numbered 0.
• Sources and sinks (external entities) as squares
• Main data flows depicted
•
DFD Rules - •
No internal data stores are shown
They are inside the system
Context • External data stores are shown as external entities
Diagram
Level 1 DFD:
• The Level 0 DFD is broken down into more specific, Level 1 DFD.
• Shows basic modules in the system and flow of data among various
modules.
• Mentionsbasic processes and sourcesof information.
• Level 1 diagram of DFD as it called system diagram describes the overall processing of
the system. It shows the major process or the functional requirements and the data
flows that are extend from the context diagram.
Level 2 DFD:
• Shows how data flows inside the modules mentioned in Level 1.
• Higher level DFDs can be transformed into more specific lower level
DFDs with deeper level of understanding unless the desired level of
specification is achieved.
A student wants to register for a course in Course
Example No. Registration System. The student sends the
1: Draw DFD Application details containing the student’s details and
desired course details. The Registration System checks
Context (Level (Process) that the course is available from the course
0) and Level 1 file. If the course is available, the student is enrolled
(Process) in the course and it will be stored in the
Course Student file. The Registration System confirms
Registration (Process) the registration by sending a confirmation
note that they are registered for the course to the
student with the course schedule details. Or if the
course is unavailable the student is sent a rejection
note.
Example-1:
Solution
Example 3: You are required to create a DFD (Context Diagram-Level
0 and Level-1) Grocery Order System. Suppose you are given the
details of a small mail order (P) catalogue system through WhatsApp that
allows people to shop from home. When a customer receives the
catalogue (DF) and wants to buy something, they can telephone, fax or
email their order to the company. The company gets the order (P) and
sends the goods (DF) and an invoice (DF). When the customer receives
the goods with a delivery note, they send payment (P) and receive a
receipt (DF) for their payment.
Context Diagram
DFD- Level 1
Example 2: You are required to create a DFD (Context Diagram-Level 0 and
Level-1) for Online hotel booking system. This system will be used by
customers who want to book a hotel room in advance. Customer can search for
rooms, types, prices, and availability from the Room file. In order to search,
customer must provide check-in and check-out dates. Based on the provided
dates, the system checks for the availability of rooms and its specifications.
Then, the system provides room status notification to the Customer. If room is
available, customer can book the room by making online payment (via debit or
credit card) and it will be stored in the Booking file. If payment is successful,
system will generate the payment receipt and booking confirmation number
will be given to the Customer. Customer can print the payment and
confirmation details.
Example No. 4 – Case Scenario (Classroom Exercise). Draw DFD Context(Level 0) and
Level 1 Diagram
Case Study: Payroll system
After completing the fact finding activities, the system analyst now understand how the current payroll system operates
and the new requirements of the system. The current system operates as following
The payroll system has 3 main processes.
Verify and update the timesheet
Salary calculation
Pay check preparation
Verify and update timesheet
When the timesheet is received from the head of department, the HR department clerks verify the timesheet and enter
the details of the timesheet into timesheet file. The leave details received from the head of departments are also will be
verified by the HR department clerks to prepare the updated timesheet and the leave details will be updated to Timesheet
file. The updated timesheet will be used to calculate the salary.
Salary calculation
To calculate the salary of employees, the updated timesheet from the timesheet file and the deduction details from the
deduction file will be used. The deduction details are updated to the deduction file by the accounting department’s loan
section.
After calculation, the salary details of each employee will be stored in salary file.
Pay check preparation.
The Pay check preparation process will be done by taking salary details stored in salary file. After preparing the pay
check, the salary statement will be sent to the employee and the payment report will be sent to bank. The bank will send
a check clearing report to the company to complete the payment process.
Example No. 8 – Case Scenario (Classroom Exercise). Draw DFD Context(Level 0) and
Level 1 Diagram
Billing System
The four main tasks in billing system are Take request, Prepare bill, Payment process and create
report
Take request
When the order is received from the customer, the employees will check the availability of the
items by taking the details from menu file. The restaurant staff will give the information about
availability of item. The details of the order will be sent to prepare the Bill.
Prepare Bill
The price details will be taken from the menu file. The quantity is entered and the system calculates
the total price for that item. The total order value is also calculated by the system. The bill will be
sent to the customer. The copy of the bill will be sent to the Accounting Department also. The bill
details will be stored in account file.
Payment process
The payment process will be done by taking the details of the invoice stored in accounts file. Every
week the company will deposit the money to bank account of different restaurants. The payment
details will be saved in payment file.
Create report
After completing the payment process the manager will prepare a weekly report by taking the
details from payment file and account file. The report will be sent to accounts department.
Example No. 5 – Case Scenario (Classroom Exercise). Draw DFD
Context(Level 0) and Level 1 Diagram- Kids Haven Day care
Registration and Assessment System
When parents come by with children we ask them to fill out application form. The
application form details includes child information and parent information. We have
to record the parent’s information in emergency contact file and child’s information in
the child file. Then, the child will be registered and the parents will receive the child’s
registration card.
Once the child has been registered, we need to place the child in a group, by getting
and analyze the abilities of the child and record the findings in the ability file. Then,
we are assessing (assessment) the child abilities and select the child appropriate
group with similar abilities and interests to place the child and stored in the ability file.
The assessment result will be given to the Parents. Then, we determine the tuition fee
and tell to the parents from the tuition file. Every month, the parents received a
monthly bill from the tuition file. When the parents make the payment, we will issue
them a receipt and stored in the tuition file.
Case Scenario No. 6(Classroom Exercise) - Online Tools for Construction
An online company sells tools for construction. The customers can place an order by
providing the order details into the system. Then, the system checks the stock availability
in the warehouse and provides order status to the customer. The system will generate a
shipping order to the warehouse. When the order is shipped, the warehouse will send
shipping confirmation to the system. The customer will make payment through
credit/debit card Details and the system will send an invoice. The system will generate an
inventory report to the Account Department.
Case Scenario No. 7. You are required to create a DFD (Context Diagram and level-1)for
elibrary system.
This system will be used by students who want to access the book online. A student has
to register first by providing student details in order to become a member of e-library. The
student details will be stored in the Student_Mem file. After registration, the student can
send the request to access the desired book from the e-book repository. The system will
check automatically into the ebook repository, if book found student will get the access of
his requested book. The system provides accessed book details to the Student. Another
hand, the ebook system manager has the rights to add the new books into the ebook
repository and has the option to generate the Book report that will be submitted to the
Library Manager of e-Book System.
3.3.2 Structured English
• Most programmers are unaware of software so they only
depend on what their managers tell them to do.
• It is the responsibility of software management team to provide correct
information to the programmers to develop correct code.
• Methods and Techniques which use graphs or diagrams, may are
sometimes interpreted differently by different people.
• So analysts and designers of the software come up with tools such as
StructuredEnglish.
• Itisthe description of what isrequired to code and how to
code it.
• Structured English helps the programmer to write error-free
code.
• Here, both Struc tured English and Pseudo-Code tries to
mitigate(reduce, lessen) the understanding gap.
• Structured English uses plain English words in structured
programming paradigm.
The following are some tokens of structured programming.
• So analysts and designers of the software come up with tools such as
StructuredEnglish.
• It is the description of what is required to code and how to
code it.
• Structured English helps the programmer to write error-free
code.
• Here, both Struc tured English and Pseudo-Code tries to
mitigate(reduce, lessen) the understanding gap.
• Structured English uses plain English words in structured
programming paradigm.
The following are some tokens of structured programming.
1. IF-THEN-ELSE,
2. DO-WHILE-UNTIL
• Analyst uses the same variable and data name, which are
stored in Data Dictionary, making it much simpler to write and
understand the code.
• Example of Customer Authentication in the online shopping
Example of Structured English
If customer pays advance then
Give 5% Discount
Else
If Bill Amount >=1000 RO then
If the customer is a regular customer then
Give 5% Discount
Else
No Discount
end if
Else
No Discount
end if
end if
52
Example No. 1:
Example 1: Sol.
Steps in Constructing Decision Table
Example 1: Sol.
Steps in Constructing Decision Table
Example 1: Sol.
Steps in Constructing Decision Table
Example 1: Sol.
Example No. 1:
Example No. 5: VIP customers who will buy less than 10 items will get 10% discounts
Regular customers who will buy more than 10 items will get 10%
discounts.
Regular customers who will buy less than 10 items will get 0%
discounts
Example No. 6:
http://www.tutorialspoint.com/
Recommended books :
Sommerville, Ian, Software engineering. — 10th
ed,
Pressman, Roger S, Software engineering: a
practitioner’s approach / Roger S. Pressman.8th
ed
https://www.tutorialspoint.com/software_engineering/software_requirements.htm