AP Computer Science - Types of Errors

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

12 Terms

1
New cards

logic error

a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly

2
New cards

syntax error

a mistake in the program where the rules of the programming language are not followed

3
New cards

run-time error

a mistake in the program that occurs during the execution of a program

4
New cards

overflow error

an error that occurs when a computer attempts to handle a number that is outside of the defined range of values

5
New cards

What are effective ways to find and correct errors?

-test cases

-hand tracing

-visualization

-debuggers

-adding extra output statements

6
New cards

Which types of errors are easier to correct? Why?

syntax error because it directs programmer to the line of code where error occurred

7
New cards

Which types of errors are harder to correct? Why?

logic error because it is not always immediately noticed

8
New cards

what is the first strategy programmers use to find logic errors?

using test cases

9
New cards

border case

where it would go from 1 output to another

10
New cards

hand tracing

writing out the values of the variables within the loop as it iterates to determine if the outcome is correct

11
New cards

when is hand tracing most useful?

for small code segments and loops that iterate a small # of times

12
New cards

when do you start testing your program?

at the onset of development