9 - algorithm design + problem solving Flashcards
abstraction
the process of extracting essential inforrmation while ignoring what isnt relevant
decomposition
the process of breaking a complex problem into smaller parts
pattern recognition
the identification of parts of a problem that are similar and could use the same solution
+ abstraction
+ time needed to develop programs is reduced
+ program is smaller in size so takes up less memory space + decreases download size
+ greater customer satisfaction as requirements met without extra features
3 ways to write algorithms
- structured English
- pseudocode
- flowcharts
4 basic constructs of algorithms
- assignment
- sequence
- selection
- iteration
flow chart symbols
square - assignment/ sequence
diamond - selection/ decisions
parallelogram - input
oval - start/end
identifier table
identifies every variable and describes what it stores and data types
stepwise refinement
decomposition breaks problems down into smaller parts
these parts are written as a series of steps where each can be written in high level language
what is an algorithm
a sequence of defined steps that can be carried out to perform a task
variable
a storage location for data with an identifier
rogue value
a value used to terminate a sequence of value - same data type but outside the expected range eg -1
procedure
a sequence of steps that is given an identifier and can be called to perform a sub task
function
procedure that returns a single value
local vs global variable
variable accessible within the module vs accessible from all modules