MOJZA
O Levels & IGCSE
COMPUTER
SCIENCE NOTES
Paper 2: Programming and
Algorithm
2210 & 0478
BY TEAM MOJZA
All rights reserved
www.mojza.org
, MOJZA
CONTENTS
Pg 02 Unit 7 Algorithm Design and
Problem-Solving
Pg 11 Unit 8 Pseudocode
Pg 26 Unit 9 Databases
Pg 31 Unit 10 Boolean Logic
1
, MOJZA
Unit 7: Algorithm design and
Problem-solving
Program development life cycle
➜ Consists of four main stages
- Analysis
➜ Abstraction: Removal of unnecessary details and identification of the key elements
of the problem
➜ Decomposition: Breaking down a complex problem into smaller, easier-to-solve
parts
➜ Identification of the problem and requirements
- Design
➜ Pseudocode
➜ Flowcharts
➜ Structure diagrams
➜ How the problem is to be solved, what tasks are required for it and how they work
with each other, and the order of those tasks is found out in this stage
- Coding
➜ Program code is written using a programming language
➜ Iterative testing of the separate modules of the program is carried out, ensuring they
work as they are meant to
➜ Most amendments to the code are carried out in this stage
- Testing
➜ The completed program is tested with test data to spot any errors
2
, MOJZA
Computer systems
➜ Made up of subsystems, which are made up of further sub-systems, and so on
➜ Made up of software, data, hardware, communications, and people
➜ The division can shown using top-down design
➜ Top-down design is the breaking down of a system into smaller sub-systems, and
those subsystems into further sub-systems, until each sub-system performs a single
action
Decomposition of a problem
➜ A problem can be decomposed by the identification of its component parts
➜ These include the inputs, processes, outputs, and storage required for the solution
- Inputs
➜ The data that is to be entered into the system for processing while it is active
- Processes
➜ The tasks that need to be performed on the data input and and/or the data
previously stored in the system
- Outputs
➜ The data that needs to be displayed or printed for the users of the system
➜ The results of the various processes carried out in the system using the input data
and/or the previously stored data
- Storage
➜ Data that needs to be stored in an appropriate medium in the system so that they
can be used throughout the program as needed
Methods used to design and construct solutions to a problem
➜ Solutions to problems need to be designed using thorough methods, to ensure that
their purpose is clearly understood
➜ Include structure diagram, flowcharts, and pseudocode
3
O Levels & IGCSE
COMPUTER
SCIENCE NOTES
Paper 2: Programming and
Algorithm
2210 & 0478
BY TEAM MOJZA
All rights reserved
www.mojza.org
, MOJZA
CONTENTS
Pg 02 Unit 7 Algorithm Design and
Problem-Solving
Pg 11 Unit 8 Pseudocode
Pg 26 Unit 9 Databases
Pg 31 Unit 10 Boolean Logic
1
, MOJZA
Unit 7: Algorithm design and
Problem-solving
Program development life cycle
➜ Consists of four main stages
- Analysis
➜ Abstraction: Removal of unnecessary details and identification of the key elements
of the problem
➜ Decomposition: Breaking down a complex problem into smaller, easier-to-solve
parts
➜ Identification of the problem and requirements
- Design
➜ Pseudocode
➜ Flowcharts
➜ Structure diagrams
➜ How the problem is to be solved, what tasks are required for it and how they work
with each other, and the order of those tasks is found out in this stage
- Coding
➜ Program code is written using a programming language
➜ Iterative testing of the separate modules of the program is carried out, ensuring they
work as they are meant to
➜ Most amendments to the code are carried out in this stage
- Testing
➜ The completed program is tested with test data to spot any errors
2
, MOJZA
Computer systems
➜ Made up of subsystems, which are made up of further sub-systems, and so on
➜ Made up of software, data, hardware, communications, and people
➜ The division can shown using top-down design
➜ Top-down design is the breaking down of a system into smaller sub-systems, and
those subsystems into further sub-systems, until each sub-system performs a single
action
Decomposition of a problem
➜ A problem can be decomposed by the identification of its component parts
➜ These include the inputs, processes, outputs, and storage required for the solution
- Inputs
➜ The data that is to be entered into the system for processing while it is active
- Processes
➜ The tasks that need to be performed on the data input and and/or the data
previously stored in the system
- Outputs
➜ The data that needs to be displayed or printed for the users of the system
➜ The results of the various processes carried out in the system using the input data
and/or the previously stored data
- Storage
➜ Data that needs to be stored in an appropriate medium in the system so that they
can be used throughout the program as needed
Methods used to design and construct solutions to a problem
➜ Solutions to problems need to be designed using thorough methods, to ensure that
their purpose is clearly understood
➜ Include structure diagram, flowcharts, and pseudocode
3