C++ Programming: Hierarchy of classes: The hierarchy of references has one base class called Reference. All the References have a unique identifier, a title, an author, and a year of publication. The implementation of the classes must follow the object-oriented principles.
Class Reference: Implement a class called Reference to represent the characteristics that are common to all the References. Namely,
1. All references must have a unique identifier (of type int).
2. All references have a title and author (both of type string or char*), as well as a year of publication (of type int).
3. The class Reference has a default constructor that initializes data members to default values.
4. The class Reference has one regular constructor: Reference(int id, char* author, char* title, int year). Note that you can use string instead of char*. The constructor must initialize the id, author, title, and year of publication of this reference using the given parameters.
5. int getId(): returns the unique identifier of this Reference.
6. char* getAuthor(): returns the author of this Reference.
7. char* getTitle(): returns the title of this Reference.
8. int getYear(): returns the year of publication of this Reference.
9. void print(): prints a string representation of this Reference consisting of the id number, reference title, author, and year of publication.
Class Article: Article is a specialized Reference that also has information about the journal where the article is published, start page, and end page. More precisely,
1. An Article is a derived class of Reference.
2. It also stores information about the journal (type string or char*) and the startPage and endPage (both of type int).
3. It has a default constructor that initializes data members, including the data members of the base class, to default values.
4. It has one regular constructor: Article(int id, char* author, char* title, int year, char* journal, int startPage, int endPage). You can assume that the parameters are valid.
5. char* getJournal(): returns the name of the journal.
6. int getStartPage(): returns the start page.
7. int getEndPage(): returns the end page.
8. It implements the member function int getNumberOfPages(), which returns the total number of pages (computed using startPage and endPage).
9. void print(): returns a string representation of objects of Article. This member function overrides the one defined in the class Reference.
*Create a test driver for class Reference and class Article