PAST PAPER 2019 Flashcards
Describe two methods of translating high level code into machine code
-Compiler
…translates code in one go / all at once
…produces an executable file // does not need to be
compiled again
Interpreter
…translates code line by line.
…will be interpreted / translated every time it is run.
Describe two examples of defensive design that should be considered when developing this
program (4)
Input sanitisation
…cleaning up input data / removing unwanted data
…by example (e.g. removing special characters /
preventing SQL injection)
Validation
…checking whether input data should be allowed / is
sensible / follows criteria
…by example (e.g. goals cannot be less than 0)
Verification
… checking whether data has been entered correctly
…by example (e.g. double entry / visual check)
Authentication
…ensuring only allowed / authorised users can gain
access
…by example (e.g. usernames /passwords)
Maintainable code
…to allow other programmers to understand the code
…by example(e.g. comments, indentation, meaningful
variable names
Give one benefit of using a check digit
-Check that the code is valid / real
Check it has been entered / sent / received correctly.
Makes it harder for people to make up discount codes