T8 - MS Flashcards
Describe the purpose of a truth table.
To show all possible inputs
…and the associated/dependent output
Give two ways that the maintainability of this program could be improved.
Add comments
Name variables sensibly
Put into subroutine / procedure /
function
Use loop / iteration
two examples of defensive design
Input sanitisation
Validation
Verification
Authentication
Maintainable code
Defensive design - input sanitisation
Input sanitisation
…cleaning up input data / removing
unwanted data
Defensive design - validation
Validation
…checking whether input data should
be allowed / is sensible / follows criteria
Defensive design - verification
Verification
… checking whether data has been
entered correctly
…by example (e.g. double entry /
visual check)
Defensive design - authentication
Authentication
…ensuring only allowed / authorised
users can gain access
…by example (e.g. usernames
/passwords)
Defensive design - maintainable code
Maintainable code
…to allow other programmers to
understand the code
…by example(e.g. comments,
indentation, meaningful variable
names)
Explain the purpose of testing a program
Check the program meets the user
requirements
Check the program works
check the program doesn’t crash
Describe the difference between iterative testing and final testing.
Iterative is during development //
repeatedly testing after/while making
changes
Final is when the development is
(almost) complete
Define the term casting
Convert/change one data type to another
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 the advantages of writing a program in a high-level language instead of in assembly language.
Easier/quicker for humans to write
Easier/quicker to read / understand /
remember
Easier/quicker to maintain / debug /
spot errors
…because code is closer to English /
uses English words