Question: - Do all requirements (full solution). - Write using basic C++ syntax and functions. - Practice using Polymorphism, virtual and pure virtual functions. - The

- Do all requirements (full solution).

- Write using basic C++ syntax and functions.

- Practice using Polymorphism, virtual and pure virtual functions.

- The prototype for merge function is merge (File *ptr).

- Do all requirements (full solution). - Write using basic C++ syntaxand functions. - Practice using Polymorphism, virtual and pure virtual functions. -The prototype for merge function is merge (File *ptr). The following diagram

The following diagram illustrates the classes you will implemen and their relationships. \begin{tabular}{|l|l|} \hline \multicolumn{1}{|c|}{ File } \\ \cline { 1 - 1 }(#) type: String \\ (\#) size: int \\ (\#) author: string \\ (\#) file__name: string \\ (\#) extension: string \end{tabular} Ex 1. File Class Implement Class file as described in the UML diagram above, Notice that: 1- print_details and destructor are virtual. 2- merge is pure function. 3- in print_details function you must print "The file type has not been specified yet". Ex 2. Excel Class Implement Class Excel as described in the UML diagram above. Notice that: 1- Parameterized constructor that receives all data members including data members in the base class. 2- In merge you must add the number of sheets in the receiving object to the current object. 3- in print you have to print all details of object. 4- override the destructor. Ex 3. Word class Implement Class Excel as described in the UML diagram above. Notice that: 1- 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, number of topics and topics to the current object and . 3- in print you must print all details of object. 4- override the destructor. Implement a driver program to test your code. 1- Create one object of type Word and another of type Excel. 2- Create array of pointers of type File of size 2 The first pointer points to the first object and the second pointer points to the second object. 3- Create array of pointers of type File of size 5, then ask the user to enter the type of file (Word or Excel) for each element of the array. 4- Merge any two objects of type Word then print the details. 5. Friend function Implement the function bool find(Word\& doc, string topic) that searches in the topics in the received Word object for the received topic. Make this function a friend of class Word 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!