Question: C++ Create a Book class, with a separate interface file (Book.h) and implementation file (Book.cpp), comprised of the following attributes: Create a Book class, with

C++

Create a Book class, with a separate interface file (Book.h) and implementation file (Book.cpp), comprised of the following attributes:

Create a Book class, with a separate interface file (Book.h) and implementation file (Book.cpp), comprised of the following attributes:

Data members (private):

string: title

string: author

Member functions (public):

Default constructor

Sets both title and author to empty strings

Parameterized constructor

Takes two strings for initializing title and author, in this order

getTitle()

Returns title as a string

setTitle(string)

(void) Assigns title the value of the input string

getAuthor()

Returns author as a string

setAuthor(string)

(void) Assigns author the value of the input string

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!