Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#include #include #include using namespace std; //Class Interface class Book{ private: int id; string title; double price; int qty; void setID(int); void setTitle(string); void setPrice(double);

image text in transcribed

#include #include #include using namespace std;

//Class Interface class Book{ private: int id; string title; double price; int qty;

void setID(int); void setTitle(string); void setPrice(double); void setQty(int); void getID() const; void print() const; Book(int, string = "No Title", double = 10.95, int = 10); }

int main () { cout

//Class Implementation void Book::setID(int i){ id = i; return id; }

void Book::setTitle(string t){ title = t; }

void Book::setPrice(double p){ if(p

void Book::setQty(int q){ if(q

int Book::getID() const return id; }

void Book::print(){ cout

Book::Book(int i = 9999, string t, double p, int q){ setID(i); setTitle(t); setPrice(p); setQty(q); }

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

Step: 3

blur-text-image

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

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

Understand why customers are loyal to a particular service firm.

Answered: 1 week ago