2.1 Algorithm Design Flashcards
Describe the purpose of validation
To test whether the data entered is reasonable/sensible.
State 5 types of validation check
Range check
Type check
Length check
Presence Check
Character check
+ Format check
+ Look up check
Describe a length check and give an example
Checks whether the data entered is within a certain number of characters
e.g. Passwords often have a minimum and maximum number of characters
Describe a range check and give an example
Checks whether the values entered are within a certain range
e.g. exam percentage must be between 0 and 100
Describe a presence check and give an example
Checks that some data has been entered (not left blank)
e.g. you must enter a username when setting up an account
Describe a type check and give an example
Check that the correct type of data has been entered
e.g. you must enter an integer when inputting an age
Describe a format check and give an example
Check that an appropriate format of letters and numbers has been used
e.g. Date must be in the format DD/MM/YYYY
Describe a character check and give an example
Checks that the input contains (or does not contain) specific characters
e.g. Passwords must contain uppercase, lowercase characters and digits
Describe the purpose of verification
To check that the data input is the same as the original source (intended input)
Describe 2 types of verification
Double Entry - Expects data to be entered twice and compares both entries to check if they are the same.
Visual Check - Data is entered once and then visually compared against the original (or entered value)
State 4 different types of test data
Normal (valid)
Abnormal (invalid)
Extreme
Boundary
Describe normal/valid test data
Data that should be accepted and has known outcomes
Describe abnormal/invalid test data
Data that should be rejected and produce error messages
Describe extreme test data
The largest and smallest values that would be accepted
Describe boundary test data
Is used to establish where the largest and smallest values occur.
At each boundary 2 values are required: one valid and one invalid