1.

Given below are incomplete definitions of two classes: class Item{int itemno;char description[21];int QOH;  // Quantity-On-Handint ROL;  // Reorder-Level intROQ;  // Reorder-Quantity public: :// Overloaded Constructor Definitionvoid purchase(int n){  : // adds n to QOH}void sale(int n){: // subtracting n from QOH}void display(void){  // display item details}};class store{ Item itemlist[50];  //List of 50 items : public: : //constructor(s) new(){ : //To add new item into itemlist}delete(){: //To delete new item into itemlist}order(itemno, qty){: //To order qty pieces for itemno}order(){: //check which item's QOH is: // below their ROL, then order for: // ROQ pieces for all those itemnos}bill(){: //Ask itemno, qtysold and: // prepare the bill. Also update: // Item's information by: // calling purchase() of Item.}};Using above information, write a complete C++ program that lets you sell, purchase or order a specific item or items.

Answer»

Code snippet of the above problem is given below use it and complete the program.



Discussion

No Comment Found

Related InterviewSolutions