Programming Flashcards
Algorithm
A series of instructions / sequence of steps designed to perform a particular task or solve a problem
Types of conditional statement
- IF… THEN… ELSE… ENDIF
2. CASE… OF… OTHERWISE… ENDCASE
Types of loop structure & their description
- FOR… TO… NEXT
- a set number of iterations - WHILE… DO… ENDWHILE
- used where the loop may never be executed
- whilst a specific condition exists - REPEAT… UNTIL
- always executed
- condition tested at end
Types of test data & reason for use
- Normal data
- Acceptable data to test that the results are as expected - Abnormal data
- Data that should be rejected and produce an error message - Extreme data / Boundary data
- Data to test the validation that is just within the limits of acceptability
Difference between a variable and a constant in a program
A variable is used to store data that can change during the running of a program.
A constant is used to store data that will not be changed during the running of a program.
7 types of validation checks
- Range check
- Length check
- Type check
- Character check
- Format check
- Presence check
- Check digit
4 types of verification checks
- Double entry
- Screen/visual check
- Parity check
- Checksum
Use of variable ‘Counter’
To use as a loop counter when entering … (eg. the temperatures)
Comment on the efficiency of your design for Task 3.
- Only checks necessary conditions
2. Uses results from Task 2
Reason for use of data structure ‘Array’
- To simplify programming
- To make programs shorter
* If using ‘several arrays’, index can be used to identify the same __ (eg. member) across the arrays
Describe the data type Char.
A single character (from the keyboard)
Describe the data type String.
An (ordered) sequence of characters
Describe the data type Boolean.
A data type with two possible values
Describe the purpose of a conditional statement.
- to allow different routes through a program
- dependent on meeting certain criteria
Validation
- automated checking
- checking that data is reasonable
- checking that data meets certain criteria