0% found this document useful (0 votes)
8 views29 pages

Chapter 12 Software Development

The document outlines the importance of requirement specification in software development, detailing techniques such as questionnaires, observation, and interviews for gathering requirements. It also discusses various software development models, including the iterative, rapid application development, and spiral models, along with types of maintenance and fault avoidance strategies. Additionally, it covers program testing methods, error identification, and pseudocode examples for programming tasks.

Uploaded by

starzlyx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views29 pages

Chapter 12 Software Development

The document outlines the importance of requirement specification in software development, detailing techniques such as questionnaires, observation, and interviews for gathering requirements. It also discusses various software development models, including the iterative, rapid application development, and spiral models, along with types of maintenance and fault avoidance strategies. Additionally, it covers program testing methods, error identification, and pseudocode examples for programming tasks.

Uploaded by

starzlyx
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

By: Mr.

Sanjay

+919596393635
Page 1
By: Mr. Sanjay

Requirement specification
Requirement specification is a crucial phase in the program development life cycle, often considered the
initial step. It involves gathering and documenting detailed information about what the software system
should do and how it should behave. Here's a breakdown of its significance and key aspects:

Requirement specification techniques encompass:

1. Questionnaires: Utilize structured sets of questions to gather requirements from stakeholders


efficiently.
2. Observation: Observe users in their work environment to identify their needs, pain points, and
usage patterns, aiding in the elicitation of implicit requirements.
3. Interviews: Engage stakeholders directly in discussions to elicit detailed requirements and insights.
4. Reviewing Paperwork: Analyze existing documents, such as business plans or technical
specifications, to extract relevant requirements.

Feasibility Study: Evaluates the technical, economic, operational, and schedule aspects of a software project
to determine if it's achievable and beneficial within the constraints of resources, time, and technology.

A feasibility study is a crucial step in the program development lifecycle aimed at assessing the viability and
practicality of a proposed software project.

+919596393635
Page 2
By: Mr. Sanjay

+919596393635
Page 3
By: Mr. Sanjay

Example of test data

Types of Maintenance:
1. Corrective Maintenance: Involves fixing bugs or defects discovered after the software has been deployed.
This could include addressing issues reported by users or identified through testing.
2. Adaptive Maintenance: Involves making changes to the software to adapt it to new environments, platforms,
or requirements. This could include updates to comply with regulatory changes or support new hardware.
3. Perfective Maintenance: Involves enhancing the software by adding new features, improving performance,
or optimizing functionality based on user feedback or evolving business needs.
4. Preventive Maintenance: Involves proactively identifying and addressing potential issues before they lead
to problems. This could include code refactoring, performance tuning, or security updates.

+919596393635
Page 4
By: Mr. Sanjay

+919596393635
Page 5
By: Mr. Sanjay

The iterative model


This development cycle first develops a simple subset of the requirements, then expands or enhances the model and
runs the development cycle again. These program development cycles are repeated until the full system has been
developed. This model is suitable for projects for which the major requirements are known but some details are likely
to change or evolve with time.

+919596393635
Page 6
By: Mr. Sanjay
Rapid application development (RAD)
This development cycle develops different parts of the requirements in parallel, using prototyping to provide early
user involvement in testing. Program development cycles are run in parallel for each part of the requirement, using
a number of different teams. Prototyping is often used to show initial versions to customers to obtain early feedback.
This model is suitable for complicated projects that need developing in a short timeframe to meet the evolving needs
of a business.

1. Spiral Model: The Spiral Model is a risk-driven software development process model that combines
elements of both iterative development and prototyping. It involves incremental development cycles,
each consisting of planning, risk analysis, engineering, and evaluation phases. The Spiral Model
allows for early identification and mitigation of risks while accommodating changes throughout the
development lifecycle.
2. Ripple model: In the Ripple Model, development progresses in a linear sequence similar to Waterfall,
with each phase being completed before moving on to the next. However, unlike the strict linear
progression of Waterfall, the Ripple Model allows for "ripples" or iterations within each phase.

+919596393635
Page 7
By: Mr. Sanjay
3. Incremental Model: The Incremental Model is a software development methodology where the
system is designed, implemented, and tested incrementally (a little more is added each time) until
the product is finished. It involves breaking down the entire project into small modules, and each
module goes through the waterfall model phases (requirements, design, implementation, testing)
individually. Once a module is developed and tested, it is integrated into the system, and the process
continues until the entire system is developed and integrated. Incremental development allows for
quicker delivery of functionality and early feedback from users.
4. The V-Model: It is a sequential development process where the development phases are aligned
with corresponding testing phases. The V-Model emphasizes the importance of testing at each stage
of development, with testing activities corresponding to development activities in a sequential
manner. This helps to identify and address defects early in the development process, reducing the
likelihood of costly rework later on.

+919596393635
Page 8
By: Mr. Sanjay
Purpose and use of structure charts
A structure chart is a modelling tool used in program design to decompose a problem into a set of sub-tasks. The
structure chart shows the hierarchy or structure of the different modules and how they connect and interact with
each other. Each module is represented by a box and the parameters passed to and from the modules are shown by
arrows pointing towards the module receiving the parameter. Each level of the structure chart is a refinement of the
level above.

Structure charts can also show selection. The temperature conversion task above could be extended to either convert
from Fahrenheit to Celsius or Celsius to Fahrenheit using the diamond shaped box to show a condition that could be
true or false, as shown below.

+919596393635
Page 9
By: Mr. Sanjay

Find length

Input height and width Calculate Output length

Do it yourself

Structure charts can also show repetition. The temperature conversion task above could be extended to repeat the
conversion until the number 999 is input. The repetition is shown by adding a labelled semi-circular arrow above the
modules to be completed.

+919596393635
Page 10
By: Mr. Sanjay

+919596393635
Page 11
By: Mr. Sanjay

+919596393635
Page 12
By: Mr. Sanjay

UNTIL
temperature =999

Identifier name description


temperature accept temperature input from the user
celsius hold the temperature in celsius
fahrenheit hold the temperature in Fahrenheit
ch to accept user’s choice

DECLARE temperature: REAL


DECLARE celsius: REAL
DECLARE fahrenheit: REAL
FUNCTION convertToCelsius (t : REAL) RETURNS REAL
RETURN (t-32)*5/9
ENDFUNCTION

FUNCTION convertToFahrenheit (t : REAL) RETURNS REAL


RETURN (t-*9/5)+32
ENDFUNCTION

+919596393635
Page 13
By: Mr. Sanjay

REPEAT
OUTPUT “Enter temperature”
INPUT temperature
OUTPUT “1: Celsius 2: Fahrenheit (please select your choice)”
INPUT ch
IF ch=1
THEN
OUTPUT CALL convertToCelsius(temperature)
ELSE
IF ch=2
THEN
OUTPUT CALL convertToFahrenheit(temperature)
ELSE
OUTPUT “Wrong Choice”
ENDIF
UNTIL temperature=999

+919596393635
Page 14
By: Mr. Sanjay

On
Ignored
On
Ignored
Standby
Off

Incomplete

+919596393635
Page 15
By: Mr. Sanjay

+919596393635
Page 16
By: Mr. Sanjay
Ways of avoiding and exposing faults in programs
Most programs written to perform a real task will contain errors, as programmers are human and do make mistakes.
The aim is to avoid making as many mistakes as possible and then find as many mistakes as possible before the
program goes live. Unfortunately, this does not always happen and many spectacular failures have occurred.
• More than one large bank has found that its customers were locked out of their accounts for some time
when new software was installed.
• Major airlines have had to cancel flights because of programming errors.
• One prison service released prisoners many days earlier than required for about 15 years because of a faulty
program.

At the coding stage, the use of programming disciplines such as information hiding, encapsulation and exception
handling, all help to prevent faults.

1. Robinhood Trading App Outage (March 2020):

What Went Wrong: Robinhood, a popular trading app, experienced a major outage on March 2, 2020, leaving
users unable to access their accounts during one of the most volatile trading days in recent memory.

Impact: Many users missed out on significant trading opportunities during a time of extreme market
volatility, leading to frustration and financial losses. Robinhood faced significant backlash and legal action
from users who were affected by the outage.
2. Zoom Security and Privacy Issues (Multiple Instances in 2020):

What Went Wrong: Zoom, a video conferencing software, faced several security and privacy issues in 2020,
including instances of "Zoombombing" where uninvited users would disrupt meetings, and concerns over
data privacy and encryption practices.

Impact: These issues led to a loss of trust among users and organizations, many of whom relied on Zoom for
remote work and communication during the COVID-19 pandemic. Governments and businesses banned or
restricted the use of Zoom, and the company faced scrutiny from regulators. Zoom had to implement
significant changes to address these concerns and rebuild trust.

3. Facebook Outage (October 2021):

What Went Wrong: On October 4, 2021, Facebook experienced a widespread outage that lasted for
approximately six hours, affecting its main platform, as well as Instagram, WhatsApp, and other services it
owns. The outage was reportedly caused by a configuration change that triggered cascading failures across
Facebook's systems.

Impact: The outage disrupted communication and business operations for millions of users and organizations
worldwide. It also highlighted the centralized nature of Facebook's services and raised concerns about the
company's control over online communication. Facebook faced criticism for its lack of transparency during
the outage and its impact on users' lives and businesses.
+919596393635
Page 17
By: Mr. Sanjay
Location, identification and correction of errors
Syntax errors are errors in the grammar of a source program. In the coding phase of the program
development lifecycle, programs are either compiled or interpreted so they can be executed.
During this operation, the syntax of the program is checked, and errors need to be corrected before the
program can be executed. Figure below shows an example of a syntax error being found, and the IDE offering
a possible reason for the error.

Logic errors are errors in the logic of a program, meaning the program does not do what it is supposed to do.
These errors are usually found when the program is being tested. For example, the program in Figure below
will run, but the results will not be as expected.

Run-time errors happen when the program is executed. The program may halt unexpectedly or go into an
infinite loop and need to be stopped by brute force. If a program is being tested in an IDE, then this type of
error may be managed, and a suitable error message given, as shown below.

+919596393635
Page 18
By: Mr. Sanjay

Program testing
During the program design stage, pseudocode is written. This can be tested using a dry run, in which the developer
works through a program or module from a program manually and documents the results using a trace table.

10 10

+919596393635
Page 19
By: Mr. Sanjay

Do you self

A walkthrough is a formalised version of a dry run using pre-defined test cases. This is where another member of the
development team independently dry runs the pseudocode, or the developer takes the team members through the
dry run process. This is often done as a demonstration. During the program development and testing, each module
is tested as set out in the test plan. Test plans are often set out as a table; an example for the calculation procedure
is shown below.

The results from this testing show that the error in the subtraction calculation has not been fixed and the routine is
not trapping any abnormal data in the variables used by the calculation. These errors will need correcting and then
the routine will need to be retested.

Do it yourself

+919596393635
Page 20
By: Mr. Sanjay

+919596393635
Page 21
By: Mr. Sanjay

Python Code

Output:

+919596393635
Page 22
By: Mr. Sanjay
Pseudocode:

CONSTANT minLength ← 8
CONSTANT maxLength ← 15

PROCEDURE checkPassword
DECLARE password : STRING
DECLARE isValid : BOOLEAN
DECLARE hasCapitalLetter : BOOLEAN
DECLARE hasDigit : BOOLEAN
DECLARE char : CHARACTER
DECLARE length : INTEGER
OUTPUT "Please enter your password"
INPUT password
length ← LENGTH(password)
isValid ← FALSE
hasCapitalLetter ← FALSE
hasDigit ← FALSE
IF length >= minLength AND length <= maxLength
THEN
FOR EACH char IN password DO
IF char >= 'A' AND char <= 'Z'
THEN
hasCapitalLetter ← TRUE
ELSE
IF char >= '0' AND char <= '9'
THEN
hasDigit ← TRUE
END IF
END FOR
IF hasCapitalLetter AND hasDigit
THEN
isValid ← TRUE
END IF
END IF
RETURN isValid
END PROCEDURE

+919596393635
Page 23
By: Mr. Sanjay

+919596393635
Page 24
By: Mr. Sanjay
CONSTANT pi ← 3.142
DECLARE radius : REAL
DECLARE answer : REAL
DECLARE reply : STRING

FUNCTION calculateVolume(radius : REAL) RETURNS REAL


RETURN (4 / 3) * pi * radius * radius * radius
ENDFUNCTION

FUNCTION calculateSurfaceArea(radius : REAL) RETURNS REAL


RETURN 4 * pi * radius * radius
ENDFUNCTION

PROCEDURE inputRadius
REPEAT
OUTPUT "Please enter the radius of the sphere"
INPUT radius
IF radius < 0
THEN
OUTPUT "Radius must be a positive number. Please try again."
ENDIF
UNTIL radius >= 0
ENDPROCEDURE

PROCEDURE outputAnswer
OUTPUT answer
ENDPROCEDURE

PROCEDURE calculateAndOutput
IF reply = "V"
THEN
answer ← calculateVolume(radius)
OUTPUT "The volume of the sphere is: "
ELSE
IF reply = "S"
THEN
answer ← calculateSurfaceArea(radius)
OUTPUT "The surface area of the sphere is: "
ELSE
OUTPUT "Invalid choice. Please enter 'V' for volume or 'S' for surface area."
ENDIF
CALL outputAnswer
ENDPROCEDURE

PROCEDURE main
CALL inputRadius

WHILE radius <> 0

+919596393635
Page 25
By: Mr. Sanjay
REPEAT
OUTPUT "Do you want to calculate the Volume (V) or Surface Area (S)?"
INPUT reply
IF reply <> "V" AND reply <> "S"
THEN
OUTPUT "Invalid choice. Please enter 'V' for volume or 'S' for surface area."
ENDIF
UNTIL reply = "V" OR reply = "S"

CALL calculateAndOutput
CALL inputRadius
ENDWHILE
ENDPROCEDURE
CALL main

1.

2.

3.

+919596393635
Page 26
By: Mr. Sanjay

D A

+919596393635
Page 27
By: Mr. Sanjay

Question 2

+919596393635
Page 28
By: Mr. Sanjay
3.
a. 1D array /List
b.

ii.
The algorithm identifies and outputs the dates of the days within the week where the combined sales of
two products exceeded or equaled 10 units, along with counting the total number of such days.

END OF THE CHAPTER

+919596393635
Page 29

You might also like