This directory contains example Java code.
- Person.java
- A generic Person class. Declared "abstract" because it
declares a method
whatAmI()
but provides no
implementation.
- Faculty.java
- A subclass of Person that implements
whatAmI()
along with
other methods related to Faculty. Includes a
toString()
method for representing this kind of object as a
String
.
- Staff.java
- Another subclass of Person that is similar to
Faculty.
- Test.java
-
- this program demonstrates how to use a
Vector
to hold
objects. The objects are of different types yet when we
treat them as Person objects, the right code gets executed
(for example when printing). Play with this code a bit to
see how Java works.
Apache/2.4.52 (Ubuntu) Server at dhansen.cs.georgefox.edu Port 443