1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
logic error
a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly
syntax error
a mistake in the program where the rules of the programming language are not followed
run-time error
a mistake in the program that occurs during the execution of a program
overflow error
an error that occurs when a computer attempts to handle a number that is outside of the defined range of values
What are effective ways to find and correct errors?
-test cases
-hand tracing
-visualization
-debuggers
-adding extra output statements
Which types of errors are easier to correct? Why?
syntax error because it directs programmer to the line of code where error occurred
Which types of errors are harder to correct? Why?
logic error because it is not always immediately noticed
what is the first strategy programmers use to find logic errors?
using test cases
border case
where it would go from 1 output to another
hand tracing
writing out the values of the variables within the loop as it iterates to determine if the outcome is correct
when is hand tracing most useful?
for small code segments and loops that iterate a small # of times
when do you start testing your program?
at the onset of development