Anda di halaman 1dari 1

CSCE

156 Lab: Inheritance


Worksheet

Name _________________________________

1. Complete Activities 1-3 and demonstrate your working design and program to a lab instructor.

2. Explain, in your own words the advantages of defining and using an interface. In particular,
what was the advantage of defining Payable as an interface with respect to the Supplier
class you created?







3. Though you had several different subclasses of Employee, each one was able to be stored in the
same ArrayList in the PayrollReport. Explain why/how this is possible.








4. You may have noticed that Eclipse has code completion abilities: type a variable name followed
by a dot and several method options will pop up. You may have also noticed that many of these
methods (toString(), wait()) are methods that you did not define in your own classes.
Where are these methods coming from?

Lab Instructor Signature____________________________________

Anda mungkin juga menyukai