Throwing Exceptions
- throws clause
- throw statement
- @throws Javadoc tag for unchecked exceptions
User Defined Exceptions
Testing Terminology
- Structured Walkthrough
- Unit Testing
- Integration Testing
- System Testing
- Acceptance Testing
- Blackbox Testing
- Whitebox Testing
- if (TESTING) {System.out.println("whatever");}
- Stubs
- Drivers
- Regression Testing
- Test Case
- Test Suite
- Test Harness
- Test Framework, e.g. junit.framework.TestCase
Testing Tips
- Normal Conditions
- Boundary Conditions
Lecture Code
The infinite loop in lecture was caused by the fact that
when a string such as apple is entered,
the InputMismatchException handler does not clear the Scanner's
input buffer. Adding the code in.nextLine(); to the exception
handler clears the buffer and fixes the problem. This is needed
for the code to work properly on either a Mac or a PC.