Write a program that keeps a library database. The elements should all be derived from an abstract base class item. Library items derived from the base class should include magazines and books.
//A Database program
// Purpose: Write a class hierarchy.
class item{.....};
class book: public item{.....};
class magazine public item{.....};
The program should read in a file of at least 15 different magazine
and book titles . Use the class ifstream to open and read in the data.
Read appendix D on IO, which has a concise description of how to
work with fstream.h.The raw data for the program should exist in a file with whatever format makes it easy to handle this problem. The data should not already be sorted, but the first field might indicate item type with each item separated by a in-line.
As each item is read in print out its contents, labeled as the unordered data set.
The program should print out an alphabetized list of books and an alphabetized list of magazines, one for each category. Furthermore, the program should print out an alphabetized list of authors, along with their relevant publications.
You should use your imagination or the library reference system in deciding what information be included in each category, such as library-of-congress number , subject, and year published.
Due Date: In class May 26, 1996.