Sample Java
The sample code below is written using only those language features that are known at the time the code is discussed. Much of the code could be improved, using more advanced Java language features. In some cases, multiple solutions are given to show how a more advanced Java language feature can be used to improve a solution.
Laboratory Assignment Solutions
- Classes: HeartRates class
- Exceptions:
- Strings: Morse Encoding
- Recursion: GCD - instrumented to illustrate recursion
- Generic class: Pair
- JUnit
Programming Assignment & Solutions
Assignment | Solution |
---|---|
Visualize an n-clique |
|
A Graphical Virtual Machine | |
Zap 'em! An animated Game | |
SuperZap 'em! A Modestly Enhanced Zap 'em Game | |
GALA: GVM Assembly Language |