2.3 Robust Programs Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is Validation ?

A

Ensuring that any data input is possible and sensible.

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

What is a range check ?

A

the input must fall within a specified range.

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

What is a length check ?

A

the input must not be too long or too short.

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

What is a presence check ?

A

a data value must be entered

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

What is a format check ?

A

the data must be in the correct format

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

What is a type check ?

A

the data must be of a specified data type

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

What is a verification check ?

A

they repeat the entered data to the user and ask them to confirm if this data is correct.`

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

What is authentication ?

A

the process of a user confirming that they are who they say they are on a computer system

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

What are the 3 factors of authentication?

A
  • something you are - username
  • something you know - password
  • something you have - swipe card, biometrics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the purpose of defensive design ?

A

that a program runs correctly and continues to run no matter what actions a user takes.

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

What are the 3 areas of defensive design?

A
  • protection against unexpected user inputs
  • maintainability
  • minimising/removing bugs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How are anticipation and protection applied ?

A
  • validation
  • sanitisation

-authentication

-maintenance

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

What is the purpose of maintainability ?

A

to ensure that, over time, a program can be easily maintained.

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

How to increase maintainability ?

A
  • Using comments
  • Using naming conventions
  • Using indentation
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are comments ?

A

Lines in programs that provide information about what the different parts of the program do.

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

What are naming conventions ?

A

Choosing a variable name that reflects the purpose of the variable.

16
Q

What is Indentation ?

A

Code within selections or iterations should be indented

17
Q

What are subprograms ?

A

small programs that are written within a larger, main program.

18
Q

What are the two types of subprograms ?

A
  • procedures
  • functions
19
Q

What are the benefits of subprograms ?

A
  • small in size - easier to write, test and debug
  • can be saved separately as modules - used again in other programs
  • may be used repeatedly at various points in the main program.
20
Q

What is a procedure ?

A

A procedure is a subprogram that performs a specific task

21
Q

How is a procedure run ?

A

A procedure is run by calling it.

22
Q

What is a function ?

A

works in the same way as a procedure, except that it manipulates data and returns a result back to the main program.

23
Q

How is a function run ?

A

A function is run by calling it.

24
Q

What are Libraries ?

A

contain pre-written, tested functions that extend the functionality of a language.

25
Q

What are syntax errors ?

A

Not following syntax rules governing how to write statements

26
Q

What are logic errors ?

A

Does not cause a program to crash but causes unexpected results.

27
Q

What are the two types of testing ?

A
  • Iterative
  • Final (terminal)
28
Q

What is iterative testing ?

A

Carried out while a program is being developed - repeats (iterates) until the module works as intended.

29
Q

What is final (terminal) testing ?

A

All modules are complete and the program is tested as a whole

30
Q

What is valid testing data ?

A
  • sensible, possible data that the program should accept and be able to process.
31
Q

What is extreme testing data ?

A
  • valid data that falls at the boundary of any possible ranges
32
Q

What is invalid (erroneous) testing data ?

A
  • data that the program cannot process and should not accept.
33
Q

What is a test plan ?

A

A list of what is to be tested and how it is to be tested.

34
Q

What are bugs ?

A

An error in a program.