CSC220 Lab Number 1
Due: 10:59AM, Tuesday, September 7 (part 1; i.e., Lab 1)
Due: 10:59AM, Tuesday, September 14 (part 2; i.e., Lab 2)

In this lab, you first learn the use of Eclipse with the help from a teaching assistant and get started on the program described below. The overall goal is to design two interfaces, one extending the other, and two classes that respectively implement them.

We wish to design two classes, TwoNames and TwoNamesValue. The former is for recording two names and the latter is for recording two names and a value.

We accomplish the above task by design the following:

  1. An interface TwoNamesInt.java for the class TwoNames.java that specifies all the aforementioned methods for TwoNames.java. They are: The code for this interface is already available. Click the link to the code for TwoNamesInt.java to obtain it.
  2. TwoNamesValueInt.java for extending TwoNamesInt.java so as to hold, in addition to the data TwoNamesInt.java specifies to hold, a double value. The interface has the following methods not defined in TwoNamesInt.java
  3. TwoNames.java for implementing TwoNamesInt.java: In addition to implementing all the methods in the interface, it has:
  4. TwoNamesValue.java for extending TwoNames.java and implementing TwoNamesValueInt.java. The class implements all the methods defined in TwoNamesValueInt.java and not defined in TwoNamesInt.java. In addition, it has:

We split this project into two labs.

  1. In the first lab, you write the code for TwoNames.java that implments TwoNamesInt.java.
  2. In the second lab, you write the other interface and the class that implments it.