Please enable JavaScript.
Coggle requires JavaScript to display documents.
IS Notes - Coggle Diagram
IS Notes
-
-
-
-
-
-
Representative examples: should cover the difference classes, valid or invalid
-
If Statements
Simple condition
If 'single expression'
statements
endif
• if the expression is false, the if is not executed and the program continues with stuff after the if statement
Compound condition
if 'compound expression' (expression w ||, && etc)
statements
endif
-
-
-
-
Validation
Test plan:
- Validations rules form part of "constraints
- Cannot assume input is valid (unless we don't know validation rules)
How to validate in pseudocode
- create a boolean variable and intialise it to TRUE before validating
- use a series of if statements (NOT nested ifs) to check for errors in input
- for each error, change boolean variable to FALSE and display error message
- after validation, check the boolean variable:
if TRUE: continue processing
if FALSE: stops processing
Parameters
- Parameters document the flow of information between modules in a program
- global variables are NOT passed as parameters!
- specify parameters in the same order in both modules
Passing parameters
- parameters pass information between modules. They can be passed between modules, passed to a module, or be expected to be passed back
- when calling a module with a parameter, the calling module (mainline) must be list the parameters it will be sending and/or receiving and the called module must list the parameters it receives and/or returns to the calling module
Global variables
- variables known to the entire program
- variables declared at the beginning of program in mainline, or entered as input are global
Local variables
- variables declared within a module