![]() |
Using Inheritance
Here we take an earlier program where two classes, Company and Employee have some common behavior; they are both named. The goal of this Magercise is to create a new common superclass that avoids duplication of code. Inheritance is discussed in detail in the course notes. Work LocationPerform all work for this magercise in VisualAge project MageLang Magercises, package magercises.inheritance. If this project does not appear in your Workspace add it from the repository (if it exists there) or create a new project using this name. Tasks
Perform the following tasks:
Modify the Employee class to use the new superclass. Modify the Company class to use the new superclass.
|
Copyright © 1996-1997 MageLang Institute. All Rights Reserved. |