Reading material
The course webpages. If you have questions or comments about the webpages,
send the instructor email or go to his office hours (preferably before
Monday May 13 when the course outline will be finalized).
Page 109 and 110 (section on loop invariants)
Additional material
Exceptions
Code conventions
- Class names start with an uppercase letter.
- Method names start with a lowercase letter.
- Constant variable names do not contain any lowercase letters and all
other variables names start with a lowercase letter.
- At most 30 lines of code are used for each method.
- Braces line up horizontally or vertically.
- Each class and method is preceded by a documentation comment in Javadoc format.
- No magic numbers are used.
- Each non-final instance or class variable is declared private or protected.
ccc
is a tool that checks some of the above mentioned code conventions.
See the manual page of ccc
for more details. See also
Java code conventions.
Java documentation comments
Question
What is the main difference between assertions (like
York.assert(...)
) and exceptions?