Producing Robust Programs Flashcards
1
Q
What are the defensive design considerations
A
- Anticipating misuse
- Input sanitisation
- Validation
- Verification
- Authentication
- Maintainable code
2
Q
What are the input validation
A
- Range check
- Type Check
- Format check
- Presence check
- Lookup table
- Length check
3
Q
How can a program be maintained
A
- Using identation to improve readibilty
- Appropriate variable names
- Comments enable programmer to understand
4
Q
Why are programs tested?
A
Ensures a program works correctly, errors have been removed and the program doesnt crash whilst running
5
Q
What are the differences between iterative and final testing
A
Iterative: takes place during program development, by developing a module tests it and repeats it
Final: after development and before the program is released - all modules are individually tested
6
Q
What is a syntax error
A
A mistake in the spelling or grammar by preventing a program from being compiled.
7
Q
What is a logical error
A
The program works but displays the wrong output