Algorithms, design & provlem solving (paper 2) Flashcards
what is the program development life cycle
analysis
design
coding
testing
define decomposition
breaking down a complex problem into smaller, manageable parts which are easier to solve
what are the steps of decomposition
- identify main problem
- identify the componenet parts of inputs, processes, outputs and storage
- list the main sub-problems, sub-systems or sub-tasks
- break these down into smaller sub-problems and sub-tasks which can be completed
what is a structure diagram used for
to show the structure of a problem, its subsections and links to other subsections
what is abstraction
simplifing a porblem so it is easier to be deal with
what are flowcharts used for
to develop solutions to a problem
what is the problem with using flowcharts
they di not usually translate very easily into program code
why do programmers use pseudocode
because it is easier for someone to understand - they can focus on the process needed rather than the coding itself
what is the assingment operator for pseudocode
an arrow
<-
what is this <
less than
what is this >
greater than
what is this <>
not equal to
what are the data types
- integer
- real
- boolean
- char
- string
what is an integer
a whole number
what is a real
a number with a decimal point
what is a boolean
true or false
what is a char
a single alphabetic or numeric character
what is a string
a sequence of one or more characters
what is the difference between a variable and constant
a variable can be changed/updated/edited after exercution but a constant stores a value that cannot be changed after exercution
what are the 3 types of code
- sequence (inputs, outputs, assignment)
- iteration (loops)
- selection (conditions)
what is stepwise refinement
when the code happens in order of it being written
in pseudocode if statements what do you particually need
IF …
THEN
ELSE IF
THEN
ELSE
END IF
what are the three iteration statements
- for … next
- while … endwhile
- repeat … until
when are case statements used
if there are several possible options ot be tested
how are case statements written
CASE OF ….
1 : …
2 : …
OTHERWISE
ENDCASE