Testing and Documenting Solutions Flashcards

1
Q

Why should a program be tested?

A

To check for errors and mistakes also you can get some ideas for improvement.

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

Name at least four ways you can make code more readable.

A

Here are some possible answers:

[1] Adding comments to explain each line of code
[2] Having meaningful variable names
[3] Using white space
[4]

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

Describe the three different types of test data.

A

[1] Normal Data - data you would expect to be entered during normal use of the program,

[2] Extreme Data - data on the limits of what the programme is designed to cope with or where something would trigger an action

[3] Exceptional Data - data that wouldn’t normally be accepted by your program

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

Describe the three different types of coding errors.

A

[1] Syntax Error - This happens whenever you miss a vital part of a code for example “ “

[2] Execution/Run-time error This happens only during when the program is running and when the user enters a different type of mark than the program expected.

[3] This is an error that causes the program to operate incorrectly but not crash. For example, you might calculate an average wrongly because you got the formula wrong. The program will still run but it will give you a wrong answer at some point.

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