Save
...
Paper 2
2.3 Producing Robust Programs
2.3.1 Defensive Design
Save
Share
Learn
Content
Leaderboard
Share
Learn
Created by
Pav Bath
Visit profile
Cards (15)
What is the purpose of input sanitisation in defensive design?
To clean up input data and remove
unwanted
data
View source
How does verification help in defensive design?
It checks whether data has been
entered
correctly by example
View source
What is authentication in the context of defensive design?
Ensuring only authorized
users
can gain access to the
system
View source
Which of the following is NOT a method of authentication?
Visual check
View source
Why is maintainable code important in defensive design?
It allows other
programmers
to understand the code
View source
What is validation in defensive design?
Checking whether
input data
is sensible and follows criteria
View source
What is a check digit used for?
To verify that a
tracking code
has been entered correctly
View source
What does a type check ensure?
That the data inputted is of the correct
data type
View source
What is a format check?
A check to ensure
data
follows a set pattern
View source
What does a length check do?
Limits the number of
characters
in input data
View source
What is the purpose of a lookup table in validation?
To ensure the data inputted is from an
allowed
set of values
View source
What does a presence check verify?
That data has been entered into a
field
View source
What is a range check used for?
To ensure input is within
sensible
limits
View source
What are the key components of maintainability in code?
Comments/annotations
to explain functions
Indentation
to show structure
Sensible
variable naming
for clarity
Modularization
for reuse and testing
Using
constants
to prevent data changes
View source
What is the purpose of using constants in code?
To ensure specific data isn't
changed
View source