What is a data type?
The kind of values that can be used in a data item
what is an arithmetic operator?
a symbol that will perform an operation on numbers
Examples of data types
Examples of arithmetic operators
+, -, *, /, ^, MOD, DIV
what is a range check?
ensuring that a number or date is within a sensible/allowed range
what is a type check?
ensuring that data is of the right type, such as integer, letter or text
Length check
Text entered is not too long or too short - for example, a password is between 8 and 15 characters
Presence check
Checks that data has been entered i.e. the field has not been left blank
Format check
Checks that the format of, for example, a postcode or email address is correct
Validation vs Verification
Double-entry verification
Authentication routines and an example
Syntax errors
Examples of syntax errors
Logic errors
Logic errors are from a misunderstanding of what the code is doing - the code will still run, but have unexpected outcomes
- using the wrong Boolean statement (e.g. OR instead of AND)
- using the wrong data type
- writing statements in the wrong sequence
Trace tables
What is an array?
What is a record?
A data structure consisting of a number of fields which can all be of different types
What is a subroutine?
A small subsection of the whole program that performs a specific, well-defined task
Parameter
A piece of data that is passed into a subroutine in order for that subroutine to do its job
Calling
A process where an instruction in one part of the code tells another named part of the code to run
Modularisation
The process of breaking a program into smaller parts called modules. A subroutine is a type of module.
Return
A command in which a subroutine passes a piece of data back to the line of code from which it was called
Authentication
The software process of ensuring that the person accessing a system is the person who is supposed to access that system. The following might be used:
- Usernames and passwords
- Memorable information - prompting for something only the real user should know, such as favourite place or the name of a first pet
- Checking that the user is using their usual computer