Professional Documents
Culture Documents
3. Requirements Documentation: this is end product of Requirements Elicitation and requirement analysis.
Requirements Documentation is important as it will be foundation for design of s/w. Document is known as
SRS.
• Requirement prioritization
4. Requirements Review: it is carried out to improve quality of SRS.
Also called requirements Verification and this is continuous activity that is incorporated into elicitation.
,analysis and documentation.
Input to Requirement Engineering: “Problem-Statement” prepared by customer.
Output of RE: SRS
Requirement
Problem Statement Elicitation
Requirement
Analysis
Requirement
Engineering
Requirement
Documentation
Requirements
SRS Review
• It is intended to generate lots of new ideas hence providing a platform to share views
• Every idea is well-documented(written in simple English) so that everyone can see it.
• Finally a document will be prepared which will consist of list of requirements and their priority if possible.
3. FAST (Facilitated Application Specification Technique)
• This team oriented approach is similar to brainstorming sessions and objective is to bridge expectation gap b/w developer and
customer.
• To reduce expectation gap, team oriented approach is developed for requirements gathering called FAST.
• Creation of joint team of customers and developers who work together to understand expectations and propose
a set of user’s requirements.
• Team is then divided into smaller subteams,each work to develop mini-specifications for 1 or more entries of
lists.
• Each subteam then presents mini-specifications to all FAST attendees.
• After discussion, additions or deletions are made to list and final list is prepared.
• Objective is to close the gap between what the developers intend and what users
expect.
4. QFD (Quality function deployment)
Its quality management technique that helps to incorporate voice of customer.
QFD has foll. 4 Steps:
1. Identify all stakeholders e.g. customers and developers.
2. List out requirements from customer;inputs;considering different viewpoints.
Some customer’s expectations may be unrealistic or ambiguous and may be translated into realistic or unambiguous
requirements if possible.
3. Value indicating degree of importance, is assigned to each requirement on a scale of 1 to 5.
It may be based on cost/benefit analysis particular to project.
QFD is a structured approach to defining customer needs or requirements and translating them into specific plans to
produce products to meet those needs.
QFD is the process used to identify the priorities for customer needs and expectations and to transfer these priorities into
the technical design of the product.
5 points: Very Important
4 points: Important
3 points: Not Important, but nice to have
2 points: Not Important
1 points: Unrealistic, requires further exploration
4. In the end, Requirement engineers may review final list of requirements and categorized them as:
a. it’s possible to achieve.
b. It should be deferred and reason for it.
c. It’s impossible to achieve and should be dropped off.
If time and effort permits, second category requirements may be reviewed and few of them may be
transferred to category first for implementation.
Actor Use case Relationship b/wactors and use case and/or b/w use cases
Outline for creating use cases
Report Generation
Admin
Login
Cancellations
Fig: Use Case Diagram for Railway Reservation System
Use case template:
We analyse, refine and scrutinize gathered requirements in order to make consistent and unambiguous requirements.
Review all the requirements and provide a graphical view of entire system.
Draw
context Develop
diagram Prototypes Model
(optional) Requirements
Finalise requirements
Steps of RA:
• We may interact with customer to clarify points of confusion.
• After the completion of analysis, it's expected that understandability of project
may improve significantly.
Step-1: Draw Context Diagram
It’s simple model that defines boundaries and interfaces of proposed system with
external world.
It identifies entities outside proposed system that interact with system.
Fig: CD for Student result management system Administrator Subject Information Entry Marks Entry Operator
Student Information Entry Marks entry
Student result
management
system
Student information report generated Student performance report generated
Marksheet generated
Step-2: Development of Prototype(optional)
• Use customer’s feedback to continuously modify prototype until customer is satisfied.
4. Data flow
• Data in motion, moving from one place in the system to another(represents
flowing data).
• Label arrows with name of data that moves through it.
• Eg,
– Invoice
– Receipt
– Enrolment form
DFD Symbols
• Parts of system represented by each of these bubbles are then decomposed and documented as more
and more detailed DFDs.
• This process may be repeated at as many levels as necessary until problem at hand is well understood.
Level 1 - overview diagram
• gives overview of full system
• identifies major processes and data flows between them
• identifies data stores that are used by the major processes
• boundary of level 1 is the context diagram
• It’s repository to store information about all data items defined in DFDs.
• At requirement stage, DD should at least define customer data items, to ensure that
customer and developer use same definitions and terminologies.
• Info. Stored include:
1. Name of data item.
2. Aliases(other names for item e.g DR for Deputy Registrar).
3. Description/purpose(textual description of what data item is used for or why it exists)
4. Related data items(capture relationships b/w data items e.g total marks must always
equal to internal marks and external marks)
5. Range of values(total marks must be positive and b/w 0 to 100)
6. Data structure definition/form.
• Data dictionary contains formal definitions of all the data items shown
in the data-flow diagrams.
• General format of data dictionary is similar to a standard dictionary;
it contains an alphabetically ordered list of entries.
• Each entry consists of a formal definition and verbal description.
• Verbal description is simply a sentence or two in English describing
the data element.
• Formal description provides a more precise definition using a
mathematical sort of notation.
Mathematical Notations used within DD:
Notation Meaning
1. x=a+b x consist of data elements a and b.
2. x=[a/b] x consist of either data element a or b.
3. x=a x consist of an optional data element a.
4. x=y{a} x consist of y or more occurrences of data element a.
5. x={a}z x consist of z or fewer occurrences of data element a.
6. x=y{a}z x consist of some occurrences of data element a which are b/w y and z.
sequence: + plus sign indicates one element is followed by or concatenated with another element.
repetition:[ ] Square brackets are used to enclose one or more optional elements.
Vertical line | stands for "or" and is used to indicate alternatives.
selection:{} Curly braces indicate that element being defined is made up of a series of repetitions of the element(s)
enclosed in brackets.
• DD can be used to:
1. Create an ordered listing of all data items.
2. Create an ordered listing of subset of data items
3. Find data item name from a description.
4. Design s/w and test cases.
3. ER (Entity relationship) diagram
• Tool for requirement analysis
• It’s detailed logical representation of data for an organization.
M:M relationships
• Each student may complete more than 1 subject and more than 1
student may complete each subject.
• Degree=2 as there are 2 entity types(STUDENT and SUBJECT)
Degree of relationships:
1. Unary (DEGREE 1)
2. Binary (DEGREE 2)
3. Ternary (DEGREE 3)
Degree: number of entity types that participate in that relationships.
Higher degree relationships: possible but rarely encountered.
PREVIOUS SLIDE:
Degree=2 as there are 2 entity types(STUDENT and SUBJECT)
Unary Relationship
• Also called recursive relationship
• It’s relationship b/w instances of 1 entity type.
• ex: there is one STUDENT entity type in universities but there may be hundreds of
instances of this entity type in database.
• Is-married-to: 1:1 relationship b/w instances of PERSON entity type
• Means each person is currently married to one other person.
PERSON Is Is
married STUDENT friend
to of
• In 2nd ex: “is-friend-of” is shown as 1:M relationship b/w instances of STUDENT entity type.
Binary Relationship
• Relationship b/w instances of 2 entity types.
• Common type
A. 1:1
B. 1:M
C. M:M
• 1:1: indicate that STUDENT is assigned STUDENT_ID and each
STUDENT_ID is assigned to student.
• 1:M: indicate that PROGRAMME may have many students and each
student belongs to 1 programme.
• M:M: shows that STUDENT may register for more than 1 subject and
each subject may have many student registrants.
Is
STUDENT assigned STUDENT-ID 1:1
PROGRAMME STUDENTS
Registers 1:M
Registers- M:M
SUBJECT
STUDENT for
Ternary Relationship
• It’s simultaneous relationship amongst instances of 3 entity types.
• Association of 3 entities: TEACHER, STUDENT, SUBJECT
• There may be 1 or many participants in ternary relationship.
• In given ex. All 3 entries are M:M participants.
TEACHER
E_id
Candidate key and identifier
• Candidate key is attribute or combination of attributes that uniquely identifies each
instance of an entity type.
• Ex: 1 candidate key for EMPLOYEE is E_id.
2nd is combination of E_name and E_address.
If there is more than 1 candidate key,designer must choose 1 of candidate keys as identifier.
IDENTIFIER: CANDIDATE KEY that has been selected to be used as unique characteristic
for an entity type.
E_id
S_address
S_name
STUDENT
S_id S_contact
Completes SUBJECT
STUDENT
Cardinality of relationships:
• Used to identify relationships b/w entity types.
Mandatory 1 cardinality
Optional 0 or 1 cardinality
Strictly 1
1 or many
O or many
Entity Relationship (ER) model for a college database
SOFTWARE PROTOTYPING
• Prototyping: technique of constructing partial implementation of system so that customers, users or developers can learn
more about a problem or solution to that problem.
• It allows users to explore, give feedback and criticize proposed system before undergoing the cost of full-scale
development.
2 prototyping technologies:
1. Throw-away
2. Evolutionary
In throw-away approach, prototype s/w is constructed in order to learn about problem or it’s solution and is usually
discarded after desired knowledge is gained and final system is built from scratch.
• Built quickly so as to enable user to rapidly interact with requirements determination early.
• As it’s discarded, it need not to be operating, maintainable.
Common steps:
1. Writing preliminary SRS.
2. Implementing prototype based on those requirements.
3. Achieving user experience with prototype
4. Writing real SRS
5. Developing real product.
• In evolutionary approach, prototype is constructed in order to learn about problem
or it’s solution in successive steps.
• Prototype is built with ideas that it will eventually be converted into final system.
• Once prototype has been used and requisite knowledge is gained, prototype is then
adapted to satisfy, now-better understand needs.
• Prototype is then used again, more is learned and prototype is re-adapted.
• This process repeats indefinitely until prototype satisfies all needs and thus evolve
into real system, final product.
• Here prototype emerges as actual system downstream in s/w life cycle.
• As with each iteration in development, functionality is added and then translated
to an efficient implementation.
• Obtain experience using it,then based on that experience go back and redo
requirements, redesign, recode, retest and redeploy.
• After gaining more experience, it’s time to repeat entire process again.
BENEFITS OF DEVELOPING
PROTOTYPE EARLY IN S/W PROCESS
1. MISUNDERSTANDING b/w s/w developers and customers may be identified.
2. Missing user requirements may be detected.
3. Difficult to use or confusing user requirements may be identified and
refined.
4. Working system is available quickly
5. Prototype serve as basis for writing specifications of system.
Pitfalls:
6. High expectations for productivity with insufficient effort.
7. Large investment
Requirement documentation
• Important activity after requirement elicitation and analysis.
• Way to represent requirements in consistent format.
• SRS: It’s a specification for particular s/w product that performs cerain
functions in specific environment.
• It serves number of purposes depending on who is writing it.
• SRS could be written by customer of system or by developer of system
• SRS: defines needs and expectations of user.
• SRS: Contract document b/w customer and developer.
• This reduces probability of customer being disappointed with final product.
NATURE OF SRS
• Basic issues that SRS writers shall address are following:
1. Functionality: what s/w is supposed to do?
2. External interface: how does s/w interact with people, system’s h/w, other h/w and other s/w?
3. Performance: What’s speed,availability,response time,recovery time etc of various s/w
functions?
4. Attributes: What are consideration for portability, correctness, maintainability, security,
reliability etc
5. Design constraints imposed on an implementation:
Are there any standards,implementation language, policies for database integrity,resource limits?
• SRS
1. Should correctly define all s/w requirements.
2. Should not describe any design or implementation details.
3. Should not impose additional constraints on s/w.
Characteristics of good SRS
• SRS should be:
1. Correct
2. Unambiguous
3. Complete
4. Consistent
5. Ranked for importance and/or stability
6. Verifiable
7. Modifiable
8. Traceable
1. correct: if every requirement stated therein is one that s/w shall meet. There is no tool/procedure that
assures correctness.
2. Unambiguous: if every requirement(each sentence in SRS) stated therein has only 1(unique)
interpretation.
If given to 10 people: single interpretation
Term used in SRS: if have multiple meaning, glossary should tells it’s meaning.
Use natural language to write SRS, it must be reviewed to identify ambiguous use of langage.
6. Verifiable:
Means there exists some cost-effective process to check that the s/w meets requirements.
Else such requirements should be removed.
Ex statement: o/p of program shall be produced within 20 seconds of event.
7. Modifiable: if SRS structure and style are such that any changes to requirements can be made easily, completely and
consistently while retaining its structure and style.
Not include redundant requirements: as leads to errors
8. Traceable: if origin of each of requirements is clear and if it facilitates referencing of each requirement in future
development or enhancement documentation.
2 types of traceability:
1. Backward Traceability: each requirement referencing its source in earlier documents.
2. Forward Traceability: each requirement in SRS have unique name and reference number.
FT is important when s/w product enters operation and maintenance phase.
Specifying behavioral requirements
• Behavioral requirements define the inputs that are expected by the system and the
outputs that will be generated by the system.
• Non Behavioral requirements define the attributes of the system while it performs its job,
like reliability, efficiency and timing constraints.
Finite state machine
• Requirement models are used to clarify and improve requirements consistency, unambiguity,
correctness and completeness.
• FSM model is very popular with requirement engineers and developers.
• FSM also known as Finite State Automation (FSA), are models of behaviors of a system or a complex
object, with a limited number of defined conditions or modes, where mode transitions change with
circumstance.
Traffic Light
States: RED, YELLOW, GREEN (simplest example)
Transitions: After a timer change RED to GREEN, GREEN to YELLOW, and YELLOW to RED.
Disadvantages of FSM
•Predictable nature of deterministic FSMs can be unwanted in some domains such as computer games (solution may be
non-deterministic FSM).
•Larger systems implemented using a FSM can be difficult to manage and maintain without a well thought out design.
•Not suited to all problem domains, should only be used when a systems behavior can be decomposed into separate
states with well defined conditions for state transitions. This means that all states, transitions and conditions need to be
known up front and be well defined
IT extra topics: not for CSE
• SRD(structured requirement definition): nothing but requirement
engineering
• structured analysis & design techniques( requirement analysis tools)
• Decision tables and trees
• Code object diagram
• PDL
Structured analysis & design techniques:
• Analysts use various tools to understand and describe the information system. One of the ways is using structured analysis.
• Structured Analysis is a development method that allows the analyst to understand the system and its activities in a logical
way.
• It’s a systematic approach, which uses graphical tools that analyze and refine objectives of an existing system and develop a
new system specification which can be easily understandable by user.
• Structured analysis and design techniques are fundamental tools of systems analysis.
• Structured analysis consists of interpreting the system concept (or real world situations) into data and control terminology
represented by data flow diagrams, ER diagrams etc..
• Result of structured analysis is a set of related graphical diagrams, process descriptions, and data definitions.
• Structured design (SD) is concerned with development of modules and synthesis of these modules in a so-called "module
hierarchy".
• In order to design optimal module structure and interfaces two principles are crucial:
• Cohesion which is "concerned with grouping of functionally related processes into a particular module”.
• Measure of how well module fits together.
• Coupling relates to "the flow of information or parameters passed between modules.
• An indication of the strength of interconnections between program units.Highly coupled have program units dependent on
each other. Loosely coupled are made up of units that are independent or almost independent.
Decision Table
• 2D mapping of conditions against actions
• Conditions evaluate to Boolean
• Actions correspond to expected activity
• Each column in the table corresponds to a test case for functional testing
• Cause-effect graph and decision table are relatives
• Map causes as conditions
• Map effects as actions
• each column of the decision table corresponds to a test case for functional testing.
• Draw causes on the LHS
• Draw effects on the RHS
• Draw logical relationship between causes and effects
• as edges in the graph.
Decision table
• It’s a graphical method for explaining the logic of making decision in tabular format.
• It is a set of conditions + set of actions and different combinations of decisions.
• “It is a matrix representation of logic of decisions which specify possible conditions for decision and resulting actions.”
is a good way to deal with combinations of things (e.g. inputs). Also called ’cause-effect’ table.
Three Parts of a Decision Table:
1. Condition stubs: Lists condition relevant to decision
2. Action stubs: Actions that result from a given set of conditions
3. Rules: Specify which actions are to be followed for a given set of conditions.
Indifferent Condition: Condition whose value does not affect which action is taken for two or more rules
Procedure for Creating Decision Tables
• Name the condition and values each condition can assume
• Name all possible actions that can occur
• List all rules
• Define the actions for each rule
• Simplify the table
• Credit card example:
Let’s take another example. If you are a new customer and you want to open a credit card account then
there are 3 conditions
first you will get a 15% discount on all your purchases today,
second if you are an existing customer and you hold a loyalty card, you get a 10% discount and
third if you have a coupon, you can get 20% off today (but it can’t be used with the ‘new customer’ discount). Discount amounts are added, if
applicable. This is shown in Table 4.8.
113
Example of Decision Tree
Yes
1 Pay base salary
No Yes
2 Pay hourly wage;
Absence report
No
Yes
Legend: 3 Pay hourly wage
1) Salaried?
2) Hours worked < 40?
No
3) Hours worked > 40? Pay hourly wage;
Pay overtime wage
An email management decision tree might begin with a box labeled “Receive new message.” From that, one branch leading off
might lead to “Requires immediate response.”
Class ATM {
// declaration here
public static void main (string args[]) InvalidCard {
try {
thisCard.read(); //may throw Invalid card exception
pin = KeyPaD.READpIN(); attempts = 1;
While (!thisCard.pin.equal(pin) & attempts < 4)
pin = KeyPad.readPin(); attempts += 1;
.
.
117
.
code object diagram
• An object diagram in the Unified Modeling Language (UML), is a diagram that shows a complete or partial
view of the structure of a modeled system at a specific time.
• In the UML, an object diagram focuses on some particular set of objects and attributes and the links between
these instances.
• Object diagrams are derived from class diagrams so object diagrams are dependent upon class diagrams.
• Object diagrams represent an instance of a class diagram.
• The basic concepts are similar for class diagrams and object diagrams. Object diagrams also represent the
static view of a system but this static view is a snapshot of system at a particular moment.
• Object diagrams are used to render a set of objects and their relationships as an instance.
• Also called Instance diagrams. Like class diagrams, they also show the relationship between objects but they
use real world examples.
• They are used to show how a system will look like at a given time. Because there is data available in the
objects, they are often used to explain complex relationships between objects.
Purpose
• The difference is that a class diagram represents an abstract model consisting
of classes and their relationships. But an object diagram represents an
instance at a particular moment which is concrete in nature.
• Object diagram is more close to actual system behavior. Purpose is to capture
the static view of a system at a particular moment and can be summarized as:
• Forward and reverse engineering.
• Object relationships of a system
• Static view of an interaction.
• Understand object behavior and their relationship from practical perspective
Object diagrams : consist of objects.
The link in object diagram is used to connect objects.
Objects and links are the two elements used to construct an object diagram.
The customer is having the following three orders with different numbers (12, 32 and 40) for the particular time considered.
customer can increase 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 are having some values.
For orders the values are 12, 32, and 40 which implies that the objects are having these values for the particular moment (here the particular time
when the purchase is made is considered as the moment) when the instance is captured. Same is for special order and normal order objects
which are having number of orders as 20, 30 and 60. If a different time of purchase is considered then these values will change accordingly.
Where to use Object Diagrams?
Object diagrams can be imagined as snapshot of a running system at a particular moment. Now to clarify it we can take an
example of a running train.
Now if you take a snap of the running train then you will find a static picture of it having the following:
A particular state which is running
A particular number of passengers. which will change if the snap is taken in a different time.
So here we can imagine the snap of the running train is an object having the above values. And this is true for any real life
simple or complex system.