A process of investigation, leading to the specification of what a program is required to do
Abstraction
A method used in the analysis stage of the program development life cycle; the key elements required for the solution to the problem are kept and any unnecessary details and information that are not required are discarded
Decomposition
A complex problem is broken down into smaller parts, which can then be sub divided into even smaller parts that can be solved more easily
Design
Uses the program specification from the analysis stage to show to how the program should be developed
Elements of design
Decomposition
Structure diagrams
Flowcharts
Pseudocode
Coding
The writing of the program or suite of programs
Testing
Systematic checks done on a program to make sure that it works under all conditions
Top-down design
The decomposition of a computer system into a set of sub-systems
The process of breaking down into smaller sub-systems is called stepwise refinement
Flowcharts
A diagram that shows the steps required for a task (sub-system) and the order in which the steps are to be performed. A graphical representation used to represent an algorithm
Pseudocode
A simple method of showing an algorithm; it describes what the algorithm does by using English key words that are very similar to those used in a high-level programming language but without the strict syntax rules
Structure diagrams
A structure diagram shows the hierarchy of a system
Benefits of Top-Down Design
Breaking a problem down into smaller parts/tasks make it far easier to understand, solve and manage
Top-down design allows several programmers or teams to work on the same project, without getting in each other's way
Each module of code to be tested separately
Variable
A storage location. It is a named value that contains data that can be changed throughout the execution
Constant
A storage location. It is a named location that contains a value that we don't want to change during the running of the program
Array
A data structure containing several elements of the same data type and stored under a single name. To reduce the number of variables used. Any item can be found using an index number
Data Types
Char
String
Boolean
Integer
Real
Algorithm
An ordered set of steps to solve a problem
Sequence
The concept of one statement being executed after another
Selection
Decides which statements are to be executed depending upon the result of a question
Conditional Statement
IF ... THEN ... ELSE
CASE .. OF .. OTHERWISE .. ENDCASE
Purpose of a Conditional Statement
To allow different routes through a program
Dependent on meeting certain criteria
Looping
FOR .... TO .... NEXT
REPEAT .... UNTIL
WHILE .... DO .... ENDWHILE
Iteration
Count-controlled loops (FOR.. TO.. NEXT)
Pre-condition loops (WHILE … DO … ENDWHILE)
Post-condition loops (REPEAT … UNTIL)
Subroutine
A sub program, it is not the whole program to perform a frequently used operation with a program. That can be called when needed and reused by another program
Procedure
A set of programming statements grouped together under a single name that can be called to perform a task at any point in a program
Function
A set of programming statements grouped together under a single name that can be called to perform a task at any point in a program. In contrast to a procedure, a function will return a value back to the main program
Parameters
The variables that store the values of the arguments passed to a procedure or function
Counting
Used with repetition with the counter increased by 1 every time the loop is repeated
Totalling
Used with repetition with the total updated every time the loop is repeated
Global variable
Can be used by any part of a program – its scope covers the whole program
Local variable
Can only be used by the part of the program it has been declared in – its scope is restricted to that part of the program
Syntax Error
Occurs when a programmer does not follow the rules or structure of the language they are writing in
Logic Error
An error in the code that causes the program to do something it should not
Validation
Automated checks carried out by a program that data is reasonable before it is accepted into a computer system
Types of Validation
Range check
Length check
Type check
Presence check
Format check
Check digit
Verification
Checking that data has been accurately copied from another source and input into a computer or transferred from one part of a computer system to another
Methods of Verification
Double Entry
Visual check
Types of Test Data
Normal data
Abnormal data
Extreme data
Boundary data
Difference between Extreme Data and Boundary Data
Extreme data is the largest/smallest acceptable value
Boundary data is the largest/smallest acceptable value and the corresponding smallest/largest rejected value