Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Defensive Design

Total questions: 11

Worksheet time: 11mins

Name
Class
Date
1.

What is defensive design?

a)

Contingency planning using validation, maintainable code and testing

b)

Contingency planning for protection against malware

c)

Contingency planning for protection against hackers

2.

What is the purpose of validation?

a)

To ensure that data entered is sensible and possible

b)

To ensure that data entered is correct

c)

To ensure that the programmer has met all requirements

3.

What does validation not do?

a)

Ensure that data entered is of the right data type

b)

Ensure that data is actually entered

c)

Ensure that data entered is correct

4.

Which of the following are validation techniques?

a)

Presence check, length check, verification check

b)

Presence check, format check, range check

c)

Presence check, range check, verification check

5.

Which of the following are part of maintainability?

a)

Comments, indentation and verification

b)

Comments, sensible variable names and verification

c)

Comments, sensible variable names and indentation

6.

Cleaning up input data or removing unwanted data. E.g. removing special characters to prevent SQL injection

(a)  

7.

Checking whether input data should be allowed. E.g. goals cannot be less than 0

(a)  

8.

Checking whether data has been entered correctly. E.g. double entry or visual checks

(a)  

9.

Ensuring only allowed / authorised users can gain

access. E.g. having usernames and passwords

(a)  

10.

Allowing other programmers to understand the code. E.g. adding comments, correct indentation and meaningful

variable names

(a)  

11.

Explain the purpose of defensive design in your own words.

4 lines