2.3 robust programs Flashcards

(25 cards)

1
Q

robust programs

A

functions correctly even if input is unexpected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

input validation

A

checking whether data matches certain rules

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

maintainability

A

ensuring a program is easy to understand and modify

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

examples of maintainability

A

-subprograms
-clear variable names
-indentation
-commenting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

advantages of commenting

A

explain sections of code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

advantages of indentation

A

show which code belongs inside a particular block

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

advantages of subprograms

A

reduces need to copy and paste code

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

purpose of testing

A

ensures a program functions as expected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

iterative testing

A

testing during development

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

terminal testing

A

tests entire program at end

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

syntax error

A

stops program running

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

logic error

A

gives unexpected output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

normal test data

A

correct data type accepted by program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

boundary test data

A

maximum or minimum correct data type accepted by program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

invalid test data

A

correct data type not accepted by program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

erroneous test data

A

incorrect data type not accepted by program

17
Q

example of syntax error

A

forgetting brackets

18
Q

example of logic error

A

wrong operator

19
Q

examples of input validation

A

-range check
-Prescence check
-length check
-format check
-type check

20
Q

how does a range check work

A

-ensures value falls between the range of two specific numbers

21
Q

how does a prescence check work

A

-ensures that input field has not been left empty

22
Q

how does a length check work

A

-ensures data is a specific length or falls between a range of lengths

23
Q

how does a format check work

A

-ensures data follows a predefined format e.g. a-z

24
Q

how does a type check work

A

-ensures data is a specific type e.g. integer/string

25
3 types of authentication
-biometrics e.g fingerprint/facial recognition -passwords/pin -swipe card