Unit 1.4 - Identifying and Correcting Errors Notes
Unit 1.4 Notes on Identifying and Correcting Errors
- Different types of errors:
- A logic error is a mistake in a program that causes it to behave incorrectly or unexpectedly
- A syntax error is a mistake in the program where the rules of programming aren’t followed
- A run-time error is a mistake that occurs in the program during the execution of the program
- An overflow error is an error that occurs when a computer attempts to handle a number that is outside the defined range of values
- Find and correct errors by:
- test cases
- hand tracing
- visualizations
- debuggers
- adding extra output statements
- In the development process, testing uses defined inputs to ensure an program is producing the expected outcomes.
- Use results of testing to revise program
- Defined inputs used to test a program should demonstrate the different expected outcomes that are at or beyond the extremes (min and max) of input data
- Program requirements are needed to define inputs for testing
Quiz
3/3