Draw UML diagram
Define a class named Document that contains a member variable oftype string named text that stores any textual content for thedocument. Create a function named getText that returns the textfield and a way to set this value.
Next, define a class for Email that is derived from Document andthat includes member variables for the sender , recipient , andtitle of an e-mail message. Implement appropriate accessor andmutator functions. The body of the e-mail message should be storedin the inherited variable text .
Similarly, define a class for File that is derived from Documentand that includes a member variable for the pathname. Implementappropriate accessor and mutator functions for the pathname.
Each class should have a display function to display the completecontents.
Create a class Author with name and id. Author is responsible tocreate the document. It means every document should have anauthor.
Create a class Administrator with name and id. Administrator candelete the document if he finds these words (“corrupt, liar,dishonestâ€) in the document text.
Finally, create several sample objects of type Email and File inyour main function. Test your objects by creating a test program.Also create relationships with author and administrator withdocument.