2.3.1 Flashcards

1
Q

what is defensive design?

A

the practice of anticipating every possible way that a user could misuse a system or device

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

a defensive design has not been good enough when:

A

-the program crashes
-the program behaves in an unintended fashion
-data security has been compromised

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

what does defensive design anticipate?

A

it anticipates misuse and uses authentication

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

what’s the first part of defensive design?

A

to decide what type of user interface to use: command line interface, graphical interface, menu driven interface

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

what’s the second part of defensive design?

A

considering how data is entered- using widgets is a way of limiting data entries and preventing entry errors

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

what’s the third part of defensive design?

A

when data is entered into a program it is important that it is valid in order for the program to operate correctly

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

validation

A

check made by a computer to ensure that the data entered is sensible or reasonable

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

what are the different types of validation checks?

A

-presence check
-range check
-type check
-format check
-lookup check
-contingencies

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

presence check

A

makes sure the data has been entered in a particular field

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

range check

A

ensures the data is within a certain limit

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

type check

A

ensures the data is in the correct data type

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

format check

A

ensures the data entered matches a particular pattern

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

lookup check

A

checks to see if the data exists in a list

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

contingencies

A

unexpected events, this could include: invalid input of data, file missing ect.

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

global

A

the variable can be used outside a function

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

what can be used to increase the maintainability of a program?

A

-sub programs
-naming conventions
-indentation
-commenting

17
Q

why is maintenance of a business needed?

A

-errors are found in the software
-a security loophole could be found
-customer would like improvements
-external factors could change

18
Q

what needs to happen to carry out maintenance on a code?

A

-the programmer needs to understand the code

19
Q

identifier

A

a word chosen by the programmer to identify the constant or subroutine (must be unique and have no spaces)

20
Q

comments

A

explain what each part of the code does and makes it easier to understand what they wrote and why

21
Q

constant

A

if a value does not need to change when a program is running it can be a constant

22
Q

indentation

A

helps to show a programmer where a block of code finishes, important for understanding how a code works

23
Q

white space

A

leaving a line gap between sections of code makes it more readable

24
Q

subprograms

A

makes programs more readable as the detail of each subroutine can be ignored when looking at the whole program