Back to marketplace

2.3 Defensive Design and Testin

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

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

Card preview (24)

#1
Front (Question)

Data type check

Back (Answer)

Checks that the value entered is of the required data type An age has been input as an integer, e.g. 21

#2
Front (Question)

Range check

Back (Answer)

Checks that the data is between an upper limit and a lower limit A probability is between 0 and 1

#3
Front (Question)

Limit check

Back (Answer)

Used to check either the upper limit or the lower limit The price of an item is not below the lower limit of 0.00

#4
Front (Question)

Length check

Back (Answer)

Checks that a specific number of characters or digits has been entered A passport number is exactly 9 digits long

#5
Front (Question)

Format check

Back (Answer)

Used to check that the data is in a specified format. Regular expressions can be useful here to match a string against a pattern. A date is in the format DD/MM/YYYY

#6
Front (Question)

Presence check

Back (Answer)

Checks that something has been entered into a field and the field has not been left blank A ‘City’ field has not been left blank when a user is entering an address

#7
Front (Question)

Existence check

Back (Answer)

Used to check that a piece of data or the name of a file actually exists The surname “Lau” exists in a customer record. The file name “highscores.csv” exists during file handling

#8
Front (Question)

Consistency check

Back (Answer)

Checks that pieces of data from two or more fields are compatible with each other The number entered for the day of the month is not higher than 29 if the month chosen is February

#9
Front (Question)

Uniqueness check

Back (Answer)

Checks that a value entered is a new and original value A username has not already been chosen when a user is creating a new account

#10
Front (Question)

Check digit

Back (Answer)

A digit that helps confirm that a code is correct The last digit of a barcode is calculated from all of the numbers before it

#11
Front (Question)

Data Type

Back (Answer)

E.g. string, integer, character, float, Boolean. An attribute of a data item that determines the values that can be stored and the operations that can be carried out on the data item.

#12
Front (Question)

Casting

Back (Answer)

Changing the data type of a piece of data, for example converting a string to an integer

#13
Front (Question)

String

Back (Answer)

A sequence of characters, e.g. letters, numbers, spaces and other symbols

#14
Front (Question)

Integer

Back (Answer)

A whole number that is either positive or negative. Examples: 5, 14, -29

#15
Front (Question)

Float

Back (Answer)

A data type for a number with a decimal place. Stored as a floating point number.

#16
Front (Question)

Function

Back (Answer)

A named block of code that performs a task and returns one or more values

#17
Front (Question)

Syntax

Back (Answer)

The precise way that program statements must be written to be understood by the computer. It is specific to the programming language in use.

#18
Front (Question)

Syntax error

Back (Answer)

When the translator does not recognise the keywords or commands entered. Common errors of this type include mistyping a keyword or missing out brackets.

#19
Front (Question)

Logic error

Back (Answer)

When code runs correctly but the program does not work as expected or produce the expected output.

#20
Front (Question)

Runtime error

Back (Answer)

When an error occurs during the use of the program. Common errors of this type include trying to divide by zero or accessing an item in an array that does not exist.

#21
Front (Question)

Testing

Back (Answer)

The systematic process of checking that a subroutine, program, or system works as expected

#22
Front (Question)

Test data

Back (Answer)

Data that has been carefully selected for testing. It should include normal, boundary and erroneous values as appropriate

#23
Front (Question)

Boundary data

Back (Answer)

Test data that is on the limit of the acceptable range of valid data

#24
Front (Question)

Erroneous data

Back (Answer)

Test data that should be caught by validation and rejected by a system