LAB02 Exercises
Supporting Material
Eclipse Support for Diagnosing Errors
- Mouse over any red error symbol that appears in the left-hand ribbon and a call-out will appear. Here's an example:

Common Syntactic Errors
- Missing or incorrect tokens, such as ; } )
- Incorrect symbol used for desired operator, e.g., using equality operator (==) incorrectly in the place of the assignment operator (=) or using wrong symbols for arithmetic addition, multiplication
Common Semantic Errors
- Attempting to use an identifier that cannot be resolved to a variable
- Attempting to use a variable before it has been declared
- Attempting to use a variable before it has been assigned an initial value
- Attempting to assign a value to a variable that has an incompatible type (see sec 1.3.3 for full description and discussion)
- Attempting to perform a type conversion (using manual casting) that is illegal (e.g., can't cast a boolean to an int)
DEFINITION OF "CORRECT"
- An app is correct if the app does what it says it will do
- An app states what it does in its external documentation (e.g., in its API or in the comments that appear before the class header)
Tools for Generating Documentation
- Examine the "doc" folder in the project and double-click on the index.html file. Notice how the contents are generated from the comments that appear before the class header! The tool that accomplishes this is called
javadoc