CIS 3931 - Elementary Java Programming
Chapter 8 Code Examples
- Cylinder.java
- Example of a simple derived class. This is derived from the
CircleWithAccessors
class -- from Chapter 6
- Cylinder.java
- Another version of the derived class Cylinder. Also derived
from the same Chapter 6 example
- TestOverrideMethods.java
- A small test program to test the overriding of methods between
the Circle and Cylinder classes
- A larger inheritance example
- Two test programs using the above GeometricObject
setup
- Interface Example:
- TestInterface.java
- a sample program that tests some classes implementing the "Comparable"
interface
- Max.java
- a class with a sample generic method, which will work with parameters
of any type that implements the Comparable interface
- TestCloneable.java
- sample use of the Cloneable interface
- ShowInnerClass.java
- sample illustrating an inner class