Question: An order processing system has to be designed as follows: Create a class called ORDER that has OrderId(int). ProdId[5](int). Quantity(int) and TotalAmount (double) as data
An order processing system has to be designed as follows: Create a class called ORDER that has OrderId(int). ProdId[5](int). Quantity(int) and TotalAmount (double) as data members. Include member functions - getOrder to input the details of the Orderld. Prodld and Quantity. Create a file called "Order.dat" to store the Order details. Create ancther class called PRODUCT that has Prodidint). ProdName(string). and Rate(double) as data members. Create a file named "Product.data" to store the Product objects. Include a non-member function called calcTotalo to compute the TotalAmount field of Order object by accessing the required details from "Product.dat". After computing the TotalAmount, update the corresponding object in the ORDER file. Include appropriate member functions to implement the above scenario.
Write a C++ code to implement the above
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
