PAST PAPER 2019 Flashcards

1
Q

Describe two methods of translating high level code into machine code

A

-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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Describe two examples of defensive design that should be considered when developing this
program (4)

A

 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Give one benefit of using a check digit

A

-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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly