7. Algorithm Design and Problem-Solving
7. Algorithm Design and Problem-Solving
YOUR NOTES
IGCSE Computer Science CIE
CONTENTS
Program Development Life Cycle - Analysis
Program Development Life Cycle - Design
Program Development Life Cycle - Coding
Program Development Life Cycle - Testing
Page 1 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Page 2 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
YOUR NOTES
Requirements
Identification of the problem: Before tackling a problem, it needs to be clearly understood
by everyone working on it. The overall goal of the solution needs to be agreed as well as any
constraints such as limited resources or requiring a platform specific solution
Requirements: To create a solution, a requirements document is created to define the
problem and break it down into clear, manageable, understandable parts by using
abstraction and decomposition. A requirements document labels each requirement, gives
it a description as well as success criteria which state how we know when the requirement
has been achieved
Page 3 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
These steps could be further subdivided, for example, “Step 2: Get breakfast” would entail:
Step 2.1 Get a bowl
Step 2.2 Get cereal
Step 2.3 Get milk
Step 2.4 Get a spoon
Step 2.5 Put cereal in a bowl
And so on…
Once the requirements document has been created, developers need to design the
structure and algorithms to solve the problem:
Structure charts are created to show the breakdown of tasks in a hierarchy
Flowcharts may be created to visually show how tasks should be carried out
Pseudocode is created, sometimes from flowcharts, to allow programmers to easily
translate task instructions into programming code
The design of a solution identifies what tasks need completing, how to complete the tasks
and how each task works together with other tasks
A computer system includes several components that work together: software, hardware,
data, networking and people
Systems can be broken down into sub-systems that can be further broken down into more
sub-systems, until each sub-system has a single purpose. This decomposition is known as
top-down design
Decomposing a system
To create an overall system and solve a problem, it must first be broken down into
subsystems that are easier to solve and create. The act of breaking down the problem is
known as stepwise refinement
Decomposing the problem this way creates smaller, more manageable and more easily
understandable sub-parts
Page 4 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Each sub-system can be assigned to a developer or group of developers who create YOUR NOTES
subroutines from these sub-systems. Each sub-system can then be created at the same
time, reducing development and testing time, especially on large projects
Decomposing the system using stepwise refinement requires developers to think about
four key areas:
Inputs: data entered into the system
Processes: subroutines and algorithms that turn inputs and stored data into outputs
Outputs: data that is produced by the system, such as information on a screen or
printed information
Storage: data that is stored on a physical device, such as on a hard drive
To solve a problem all aspects must be thoroughly understood by the developers
There are many methods used to design and construct solutions. Three such methods are
illustrated below:
Page 5 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Page 6 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
YOUR NOTES
Worked Example
A satellite navigation system is an example of a computer system that is made up
of subsystems. Part of a satellite navigation system: allows the user to enter details
for a new destination or select a previously saved destination and displays
directions in the form of a visual map or as a list. Draw a structure diagram for this
part of the satellite navigation system.
[4]
[1] for a hierarchical structure
[1] for suitable names for the sub-systems
[1] for identifiable inputs
[1] for identifiable outputs
Page 7 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Page 8 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
YOUR NOTES
Pseudocode
Pseudocode is a programming-like language that does not have syntax. It can be
considered “fake” code.
It uses english words and phrases to represent instructions and is very similar to
programming code but does not and cannot run on any computer
The purpose of pseudocode is to allow developers to understand how to create a program
regardless of the programming language used to implement the solution
While pseudocode has no specific syntax, it is important to stick to a consistent style. This
will make it easier and quicker for programmers to read and create programs from the
pseudocode
Examples of a consistent style can include:
Keywords are written in capital letters e.g. INPUT, OUTPUT, IF, THEN, ELSE
Variable and subroutine names start with capital letters e.g. Age, Name, Date,
CalculateArea, Sortlist
Indentation can be used for iteration and selection
Page 9 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Page 10 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers
Head to savemyexams.com for more awesome resources
Page 11 of 11
© 2015-2023 Save My Exams, Ltd. · Revision Notes, Topic Questions, Past Papers