Question: See the image attached below. Please include all header/.cpp files. 1. Create the following classes in C++ a. Author name: string email: string -gender: char

See the image attached below. Please include all header/.cpp files.

See the image attached below. Please include all header/.cpp files. 1. Create

1. Create the following classes in C++ a. Author name: string email: string -gender: char +Author(name: string, email: string, gender: char) +getName(): string +getEmail(): string +setEmail(email: string): void +getGender(): string +print(): string The class Author contains: Three private member variables: name (String), email (string), and gender (char of either 'm' or ' f'. . . A constructor to initialize the name, email and gender with the given values. Public getters/setters: getName (), getEmail (), setEmail (), and getGender (). A print ( ) function that returns "name (gender) at email", e.g., "Mike (m) at mJones@somewhere.com". b Book -name: string author: Author -print: double +Book(name: string, author: Author, price: double) +getName(): string getAuthhor(): Author +getPrice(): double +setPrice(price: double): void +print(): string The class Book contains: Four private member variables: name (String), author (an instance of the Author class we have just created, assuming that each book has exactly one author), price (double). The public getters and setters: getName (), getAuthor (), getprice (), setprice () . A print () that returns "book-name by author-name (gender) at email". You could reuse the Author's print ( ) function, which returns "author-name (gender) at email". Write a program to test the Author and the Book classes. Create objects of each class type and use the print function in the objects to display information

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 Programming Questions!