Back to marketplace

2.3.1 - Defensive Design

No description yet. This curated deck is ready for daily study.

Total cards: 15•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (15)

#1
Front (Question)

What is anticipating misuse

Back (Answer)

• Ensuring a program caters for all possible inputs no matter how far fetched they are • This is done by sending messages to correct user inputs

#2
Front (Question)

What is authentication and how is it proved

Back (Answer)

• A process used to verify the identity of the user so only the correct user can access data • It can be proved by a PIN, username and password, biometrics or personal information e.g. mothers maiden name

#3
Front (Question)

What is verification

Back (Answer)

Asking a user to input some information such as a password twice to ensure it is them This is a part of authentication

#4
Front (Question)

What is input validation and why is it needed

Back (Answer)

• Ensures data entered is reasonable and sensible and in the right format • Reduces the risk of incorrect data crashing a program

#5
Front (Question)

Types of validation checks

Back (Answer)

• Presence check • Data type check • Format check • Length check • Range check

#6
Front (Question)

What is a presence check

Back (Answer)

• Makes sure a value is inputted and the user doesn’t accidentally leave something blank • Example code: if answer != “ “ then

#7
Front (Question)

What is a data type check

Back (Answer)

• Makes sure the data entered is of the correct type e.g, only integers are entered as an input

#8
Front (Question)

What is a range check

Back (Answer)

• Checks the upper and lower boundaries to make sure the users input is inbetween sensible values e.g. age for a game is inbetween 7-99

#9
Front (Question)

What is a length check

Back (Answer)

• Limits the data entered to make sure it is not too short or too long

#10
Front (Question)

What is maintainability and methods of doing it

Back (Answer)

• Making sure a program is easy to undersand or to modify • Indentation • NAming conventions • Using subprograms • Commenting

#11
Front (Question)

What is indentation

Back (Answer)

• Where some lines of code are forward a few spaces • This is used in selections and iterations • They make it easier for the programmer to see where these loops are Python auto indents but some other programming languages don’t

#12
Front (Question)

What are naming conventions

Back (Answer)

• Giving variables sensible names that reflects the purpose of the variable and the data it stores • This allows other programmers to understand what the variables are used for

#13
Front (Question)

What is commenting

Back (Answer)

• # or // • Allows for English communication of what certain parts of the code does • Documents the creator and who edits as well • this allows it to be maintained long after it was created

#14
Front (Question)

What are subprograms and the different types of subprograms

Back (Answer)

• Breaking the code into smaller parts with each subprogram having a set role to produce structure code • Functions - used to read data, manipulate it and send it back to the main program (return) • Procedures - performs a task but doesn’t return a value

#15
Front (Question)

Advantages of subprograms

Back (Answer)

• Saves time - can be saved as separate modules and used in other programs • Small so easy to write, test and debug • Shorter programs - can be called multiple times and only has to be written once