Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 5. The Author and Book Classes (for a Bookstore) This task has two parts, at first write class Author, after that write class Book.

image text in transcribed

Task 5. The Author and Book Classes (for a Bookstore) This task has two parts, at first write class Author, after that write class Book. Contain a '@'. Author -name:string -email:string -gender:char +Author(name:string, email:string, gender:char) +getName(): string +getEmail():string +setEmail (email:string):void +getGender():char +print():void 'm', 'f', or 'u' for unknown "name (gender) at email Write a class Author, designed as shown in the class diagram. It contains: 1. Three private data members: name (string), email (string), and gender (char of'm', 'f or 'u' for unknown). 2. A constructor to initialize the name, email and gender with the given values. There are no default values for data members. 3. Getters for name, email and gender, and setter for email. There is no setter for name and gender as we assume that these attributes cannot be changed. 4. A print() member function that prints "name (gender) at email", e... "Peter Jones (m) at peter @somewhere.com

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

How autonomous should the target be left after the merger deal?

Answered: 1 week ago