paper 1 Flashcards
examples of analysis stage work during software dev
- problem definition
- list of objectives
- data model
- interviews
- questionnaires
- research existing solutions
- acceptable limitations / constraints
why use named constants
- makes clear what the value held by the constant actually is / used for
- if the constant’s value would need to be changed, it only needs to be changed in one place
- improves readability of the code
purpose of a hierarchy chart
- represent the structure of the program
- to aid decomposition of a problem
differences between local and global variables
- global variables accessible to all parts of the program / have global scope
- global variables declared in main program block
- local variables declared in subroutine
- local variables accessible only in program block/subroutine they were declared in
why use local variables
- makes a subroutine self-contained
- easier to re-use subroutine in another program
- releases storage when subroutine terminates
decomposition
breaking a problem into a number of sub-problems that are easier to understand, program and maintain
automation
models are put into action to solve problems. involves creating algorithms for performing actions on, and with, the data that has been modelled
composition
combining procedures into compound procedures
problem abstraction / reduction
details are removed until the problem is represented in a way that is possible to solve because the problem reduces to one that has already been solved
why use meaningful variable names
easier to follow program process
array
finite, ordered set of elements of the same data type
what is a structured programming approach
- decomposition of a problem
- makes use of subroutines
- makes use of control structures - sequence / selection / iteration
what is a subroutine
named block of code performing a specific task within a program
features of a structured program
- selection, iteration, sequence
- modular
- exit gate
advantages of modular programming
- easy to understand subroutines as small units of code - easier to understand, debug, maintain
- subroutines can be tested independently, shortening dev time
- modules can be reused in other programs