Algorithms and Programs
Algorithms and Programs
The first stage in the software development Term Definition A variable is a holder for an item of data (that
process. can be changed) of a specific type and length.
Algorithm The list and sequence of steps Data types include character, integer, real and
1. Problem analysis.
that need to be taken to solve a Boolean.
2. Requirements, definition and refinement. specific problem and produce the
Variables must be defined in a program by
3. Software specifications and detailed design. desired output.
specifying the type and length, and assigning
4. Software creation and refinement. a self-identifying name, indicative of the data
Variables Memory locations used to store
5. Software validation. stored.
data that can change during
program execution. Variables Variables are assigned a memory location when
Problem analysis is the process of should be given identifiers to the program is loaded into memory. The data in
understanding and defining the problem which reflect the data being stored. a variable may be created, edited, and deleted
needs to be solved. It is not problem solving. whilst the program is running.
Problem analysis may be considered as a 5-step Constants Memory locations used to store
process. Global variables: variables declared in the
data that does not change during
main program are static and have ‘global
Step 1: define the problem. State the problem program execution.
scope’ because it can be accessed from all
in writing having gathered views from various parts of the program.
stakeholders.
Common methods of defining algorithms Local variables: variables declared in a sub-
Step 2: complete a root cause analysis. procedure are dynamic and have ‘local scope’
Step 3: identify the affected people (User/ because it can only be accessed from within
Customer/Manager etc.). Pseudo code: an informal way of writing that sub-procedure.
an algorithm that does not require any strict
Step 4: define the scope of the solution. programming language syntax or underlying Static variables: each time a program is
Step 5: identify solution constraints (time, money, technology considerations. It is used for creating an run, static variables are stored in a location in
expertise, technology etc.). outline or a rough draft of a program. Pseudo code memory and have a lifespan that lasts the entire
summarises a program’s flow but excludes any time that program is running.
During problem analysis computational thinking underlying details. Dynamic variables: each time a dynamic
methods and techniques will be used. For this qualification pseudo code will be presented variable is declared, it is assigned a new
Decomposition: breaking down the problem into using the conventions given in the WJEC GCSE location in memory and has a lifespan that ends
smaller sub-problems which can be considered in specification. when the sub-procedure ends.
isolation. This can help sequence the analysis and it
Flowcharts: a diagrammatic representation
also encourages a systematic approach.
of an algorithm. The flowchart shows the steps
Pattern recognition: recognising patterns in as symbols of various kinds and their order by Constants
complex problems can help to solve them more connecting the symbols with arrows.
efficiently. If a problem requires the same steps For this qualification, flowchart symbols will be as A constant is a holder for an item of data that
to be taken over and over again, it makes sense identified in note 5 of Appendix D of the AS/A level will not be changed whilst the program is
to identify it early on, then the process of solving specification. running.
them becomes more manageable.
Structured English: the use of the English Constants should be declared in the main
Abstraction: abstraction is about looking at the language with the syntax of structured program by specifying a value and assigning a
problem and the patterns and working out what is programming to communicate the design of a self-identifying name. Any change in the value
important and what can be ignored. Unnecessary computer program to non-technical users. This will involve editing the value in the source code.
details are removed so that a model can be formed is done by breaking the design down into logical
that will allow a solution to be created. steps and using straightforward English words.