BY REF or BY VAL
By value
- If variable is used the value cant be changed within the procedure
By reference
- The value passed in can be changed by the procedure
how to test to expose a fault
disadvantage of a linked list
more complex
store pointer and data
meaning of up and down arrows in waterfall model diagram
down - result from one stage is passed to the next
up - more work required at the previous stage to complete the current stage
procedure call pseudocode
CALL PROCEDURE()
state of queue is front and end pointers same
one data item in it
3 thinsg that take place during design
advantages of having less modules
+ only have to change one module if spec changes
+ less repetitive code
+ aids reusability
insertion sort
concatenation pseudocode
&
principle of RAD
minimal planning/ flexible process
2 reasons for adaptive maintenance
procedure interface
provides a mechanism to allow calling a program to pass data
defines the parameters giving their data type and order
- Must match the procedure/function definition
- Parameters must match those in the definition – in type and in order
+ constant
file operations - input, process, output
write file - output
read file - input
additional info needed for walkthrough
source code or inputs and expected outputs
- structure/ design of algorithm needs to be known
- so all paths can be tested
stepwise refinement
decomposition breaks problems down into smaller parts
these parts are written as a series of steps where each can be written in a high level lang
program development lifecycle
analysis
design
coding
testing
maintenance
walkthrough
used predefined test cases where another member dry runs the pseudocode - check specific areas
ADT
loops
waterfall
iterative
RAD