The following is a class diagram for class textBook and the main() program. The
class consists of 3 data members and 4 function members. Write a complete
C++ program that is able to do the following tasks:
textBook
bookName : char[]
bookPrice : float
totalInStock : int
Constructor
orderBook(int):void
checkQty() : float
printDetail() : void
main()
{
textBook classBook(“Learning C”,150.00,200);
textbook storyBook(“Upin Ipin”);
classBook.orderBook(20);
cout << “Total book in stock “ << storyBook.checkQty();
storyBook.printDetail();
:
}

Welcome accy,
Are you teacher or student?
You must read following before you post:
1.Homework policy
2.How to post source code?
3. Title of thread must reflect your question.

Source code must be surrounded with code tags.
For example,

[CODE=cplusplus] ... statements..

[/code]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.