paper 2 dk Flashcards
(31 cards)
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
- dry run
- write output statements to track the code
- breakpoint/ single stepping/ report window
- try test values to see which fail
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
- data structures decided on
- algorithms / flowcharts/ pseudocode created
- program structure and modules created
- test method chosen
- programming lang chosen
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
- requirements change
- new tech available
- change in legislation
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
- only needs to be changed once
- prevents input error
- makes program easier to understand
- less repeated code
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
- Collection of data and a set of operations on that data
loops
- Count controlled
- Pre condition
- Post condition
waterfall
- Each stage completed before the next is begun, fully documented, low customer involvement
iterative
- Subset of requirements is developed then expanded or enhanced – repeated until full system has been developed, working parts produced at each iteration, high customer involvement
RAD
- Different parts of requirements are developed in parallel using prototyping to provide early user involvement, minimal planning, reuses pre written code, high customer involvement