Question: Question need help to complete below: Consider the following incomplete class definitions. Fill in the missing code as described in the comments. Your solution should

Question need help to complete below:

Consider the following incomplete class definitions. Fill in the missing code as described in the comments. Your solution should call the appropriate set and get functions on a Book object.

class Book{

public:

//Provide:

// - a pure virtual function to set the ISBN/eISBN

// - a pure virtual function to get the ISBN/eISBN

};

// create an EBook class that inherits from Book

{

int eISBN;

public:

void set(const int _eISBN){eISBN=_eISBN;};

int get() const{return eISBN;};

};

// create a PaperBook class that inherits from Book

{

int isbn;

public:

void set(const int _isbn){isbn=_isbn};

int get() const{return isbn;};

};

Additionally, describe in a couple of sentences the purpose of a pure virtual member 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 Programming Questions!