paper 1 Flashcards
(39 cards)
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
why use exception handling
- avoid errors which will cause the program to crash
tasks performed during design soft-dev stage
- data structures specified
- algorithms / ui / screen designs designed
- design appropriate module structure
task performed during technical soft-dev stage
- implementation / writing of code
task performed during testing soft-dev stage
- system tested for presence of errors, using selected test data covering normal, boundary and erroneous data
- testing for logic errors, syntax errors, runtime errors
task performed during evaluation stage
- system evaluated according to given criteria
erroneous data
data outside of expected range and/or wrong data type
strategies for problem solving
- exhaustive search
- binary search
exhaustive search
trying every possible method / searching every possible item
linear search
search item compared with each element in list in linear fashion
looks at, on avg, n/2 items