CIS 435 Lab 4

Points: 30 Due Date: Friday January 18, 2004

This one is going to use many of the skills you have learned and some that you haven't yet.
You will make a class hierarchy consisting of a base class called holding. This class represents objects in a library. It will have at least the data elements name (a String), cost (a float) and location (an int). You will have to implement methods to access these fields. There will be two derived classes. One is book. This has the additional fields of author (a String) and pages (an int). The other is video. This has the additional fields of director (a String) and length (a float).

You will make an array that can contain pointers to these objects. You will make instances of the objects using new. You will prompt the user for what kind of object to make and then make one. Be careful about this part. It is different than the Firm example.

Each class will have an input method that prompts the user to fill in the data on the class. It will have to use the parent methods to fill in those fields.

Make sure you use toString as appropriate. Use abstract to mark classes you won't be making any instances of.

I know this is a little vague. Start thinking about it know and ask lots of questions.

Deliverables:

You should turn in a listing of the program. Staple the cover sheet to that.

Notes

Think about how you will do this so you can ask questions.
ASK if you have any questions.