Testing and Evaluation unit 2 Flashcards

(10 cards)

1
Q

What is a logic error?

A

Where your program does something unexpected.

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

What is a syntax error?

A

Where you’ve broken the rules of the language, like missing a bracket or keyword.

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

What is a runtime error?

A

An error that happens while the program is running, such as dividing by zero or opening a missing file.

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

What is a trace table used for?

A

To manually follow an algorithm step-by-step and track the values of variables at each stage.

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

What should be included in a test plan?

A

Types of tests, test data, expected results, and how to tell if the program meets the requirements.

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

What are the three main types of test data?

A
  1. Normal data: data that is well within the limits of what should be accepted. e.g. Age = 25
  2. Boundary data: data that is at the outer limits of what should be accepted (range). e.g. Age = 0 or Age = 120 (if 0–120 is valid)
  3. Erroneous data: data that should not be accepted by the program. e.g. Age = -5 or Age = “twenty-five”
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Why is testing important?

A

To make sure the program works as expected and handles errors properly.

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

How do you determine the value of a variable at a given point?

A

Use a trace table or follow the code step-by-step to see how the variable changes.

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

What does it mean to evaluate a program?

A

To look at its strengths and weaknesses, and suggest improvements.

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

Give one example of improving a program.

A

Use subprograms to reduce repetition, or add input validation for better error handling.

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