Question: Hello, I'm posting this question for the second time because the answer was not correct, please help me and read the question and give me

 Hello, I'm posting this question for the second time because theanswer was not correct, please help me and read the question andgive me a correct answer as soon as possible. Thanks The following Hello, I'm posting this question for the second time because the answer was not correct, please help me and read the question and give me a correct answer as soon as possible. Thanks

The following diagram illustrates the classes you will implement in this lab and their relationships. Book Class Implement the Class book as described in the UML diagram above, Notice that: 1- print_details and destructor are virtual. 2- merge (Book) is a pure function. 3- in the print_details function you must print "The book type has not been specified yet". ScientificBook Class Implement Class ScientificBook as described in the UML diagram above. Notice that: 1- A parameterized constructor that receives all data members including data members in the base class. 2- In merge you must add the number of pages in the receiving object to the current object. 3- in print, you have to print all details of the object. 4- override the destructor. HistoricalBook class Implement Class HistoricalBook as described in the UML diagram above. Notice that: 1- A parameterized constructor that receives all data members including data members in the base class. 2- In the merge, you must add the number of pages in the receiving object, and the number of topics and topics to the current object. 3 - in print, you must print all details of the object. 4- override the destructor. Driver Implement a driver program to test your code. 1- Create one object of the type HistoricalBook and another of the type ScientificBook. 2- Create an array of pointers of type Book of size 2, the first pointer points to the first object, and the second pointer points to the second object. 3- Create an array of pointers of type Book of size 5, then ask the user to enter the type of Book (HistoricalBook or ScientificBook) for each element of the array. 4- Merge any two objects of type HistoricalBook then print the details. Friend function Implement the function bool find (HistoricalBook \& his, string topic) that searches in the topics in the received HistoricalBook object for the received topic. Make this function a friend of class HistoricalBook and modify your main0) to test this function

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!