Assignment 4 - Inheritance

Due Before class on Nov 7th

The objective of this assignment is to try to understand how to use inheritance—that is to create classes which inherit features of other classes.

I have created two applets, ChartApplet and MultiChartApplet which use some classes I created that draw various styles of charts: LineChart, PieChart and BarChart. Each of these three classes inherits some basic features, such as a data array and methods for changing the colors, from a class called Chart. The applets which make use of these chart classes are displayed on THIS PAGE.

This week's assignment is to write your own BarChart class which inherits from the Chart class and will work when used in either ChartApplet or MultiChartApplet.

As always, I recommend writing code in small increments and testing after each addition. The idea is to always have working code so when something doesn't work right you know the problem is in (or at least made visible by) the small amount of new code you've just added.

Watch this space for some suggestiions....

Helpful Links