Hi ,

i am very new to C++ , OOP concept.

I am making a bookstore using classes and have made it till books details ( tat is for ex. 10 books aval and when the user searches fo particular book he gets the detail with price and aval copies) and now want to add many things like purchase details and sotck details.

Please advise how to go about it, am so confused abt how to go abt...

Thanks in advance.

Regards,

vanitha

Thinking things through the best you can, frequently pencil and paper help a lot, before writing code will be very helpful. For example, you may want to to declare the bookstore as a collection of holdings and transactions. Each holding has a book and an inventory amount. Each transaction has purchase details including book purchased, number of each book purchased, cost of each book, total cost of each book, total cost of all books purchased, taxes, shipping costs, date of shipping, route of shipping, shipping number, expected time of shipping and arrival, shipping address, billing addres, how billed, etc.

Good luck.

Thanks a lot...

can i add another class called purchase or stock..

will that be a good idea?

Regards,
Vanitha

Purchase would seem to correspond to transaction which could be a separate class. Stock would seem to correspond to holdings which could well be a separate class. So, yeah, why not.

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.