Answer to Question #185719 in C++ for Majid

Question #185719

Create an object of BOOK. Input the values in data members of object and then display the data of object. In main () function, also use switch statement to prompt the user for choice of operations either to purchase or sell a book. Sold () function must also check the quantity available to sell


1
Expert's answer
2021-04-26T13:58:29-0400
#include <iostream>


using namespace std;


class Book
{
    static int _amount;
    string _bookName;
    string _author;


public:
    Book()
    {
        _amount = 0;
        _bookName = "";
        _author = "";
    }
    Sold()const
    {
        return _amount;
    }
};


int main()
{
    Book book;


    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS