WorksheetsDefensive Design
Total questions: 11
Worksheet time: 11mins
What is defensive design?
Contingency planning using validation, maintainable code and testing
Contingency planning for protection against malware
Contingency planning for protection against hackers
What is the purpose of validation?
To ensure that data entered is sensible and possible
To ensure that data entered is correct
To ensure that the programmer has met all requirements
What does validation not do?
Ensure that data entered is of the right data type
Ensure that data is actually entered
Ensure that data entered is correct
Which of the following are validation techniques?
Presence check, length check, verification check
Presence check, format check, range check
Presence check, range check, verification check
Which of the following are part of maintainability?
Comments, indentation and verification
Comments, sensible variable names and verification
Comments, sensible variable names and indentation
Cleaning up input data or removing unwanted data. E.g. removing special characters to prevent SQL injection
(a)
Checking whether input data should be allowed. E.g. goals cannot be less than 0
(a)
Checking whether data has been entered correctly. E.g. double entry or visual checks
(a)
Ensuring only allowed / authorised users can gain
access. E.g. having usernames and passwords
(a)
Allowing other programmers to understand the code. E.g. adding comments, correct indentation and meaningful
variable names
(a)
Explain the purpose of defensive design in your own words.
