Introduction
The objectives of this lab are to:
- Illustrate how inheritance allows us to derive new classes from existing ones so that we may reuse code without altering (and breaking) existing code.
There is a lot of sample code for this lab, so we have created a project you can import. You can import the whole project (as you did for homework 3):
Alternatively, you can view or import the files one by one. First create a project named project8
and two packages lab8
and library
.
In the lab8
package, you want these classes:
IntList.java
IntListSorted.java
And in the library
package, you want these classes:
Book.java
Documentary.java
Item.java
Movie.java
Patron.java
ReferenceItem.java