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 character
array), 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 character string) and pages (an int). The other is video.
This has the additional fields of director (a character array) 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.
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.
You will need to use exceptions to handle errors like no memory, bad user input, etc.
Add a print method to each class. The in the main, print all the objects in the array.
I know this is a little vague. Start thinking about it know and ask
lots of questions.
Hand in the listing. Be sure to explain your method in the comments.