T8 - MS Flashcards

1
Q

Describe the purpose of a truth table.

A

To show all possible inputs
…and the associated/dependent output

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

Give two ways that the maintainability of this program could be improved.

A

Add comments
Name variables sensibly
Put into subroutine / procedure /
function
Use loop / iteration

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

two examples of defensive design

A

Input sanitisation

Validation

Verification

Authentication

Maintainable code

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

Defensive design - input sanitisation

A

Input sanitisation
…cleaning up input data / removing
unwanted data

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

Defensive design - validation

A

Validation
…checking whether input data should
be allowed / is sensible / follows criteria

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

Defensive design - verification

A

Verification
… checking whether data has been
entered correctly
…by example (e.g. double entry /
visual check)

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

Defensive design - authentication

A

Authentication
…ensuring only allowed / authorised
users can gain access
…by example (e.g. usernames
/passwords)

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

Defensive design - maintainable code

A

Maintainable code
…to allow other programmers to
understand the code
…by example(e.g. comments,
indentation, meaningful variable
names)

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

Explain the purpose of testing a program

A

Check the program meets the user
requirements
Check the program works
check the program doesn’t crash

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

Describe the difference between iterative testing and final testing.

A

Iterative is during development //
repeatedly testing after/while making
changes
Final is when the development is
(almost) complete

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

Define the term casting

A

Convert/change one data type to another

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

Describe two methods of translating high level code into machine code.

A

Compiler
…translates code in one go / all at
once
…produces an executable file // does
not need to be compiled again
Interpreter
…translates code line by line.
…will be interpreted / translated every
time it is run.

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

Describe the advantages of writing a program in a high-level language instead of in assembly language.

A

Easier/quicker for humans to write
Easier/quicker to read / understand /
remember
Easier/quicker to maintain / debug /
spot errors
…because code is closer to English /
uses English words

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