[Solved] C Program Backwards Warehouse Prompt Write Program Handle Flow Widgets Warehouse Warehouse Q37171191
C++Program Backwards Warehouse______________________________________________Prompt:Write a program to handle the flow of widgets into and out ofa warehouse.
The warehouse will have numerous deliveries of new widgets andorders for widgetsThe widgets in a filled order are billed at a profit of 50percent over their costEach delivery of new widgets may have a different costassociated with itThe accountants for the firm have instituted a last-in,first-out system for filling orders. This means that the newestwidgets are the first ones sent out to fill an orderAlso, the most recent orders are filled firstThis function of inventory can be represented using twostacks: orders-to-be-filled and widgets-on-hand. When a delivery ofnew widgets is received, any unfilled orders (on theorders-to-be-filled stack) are processed and filled. After allorders are filled, if there are widgets remaining in the newdelivery, a new element is pushed onto the widgets-on- hand stack.When an order for new widgets is received, one or more objects arepopped from the widgets-on-hand stack until the order has beenfilled.If the order is completely filled and there are widgets leftover in the last object popped, a modified object with the quantityupdated is pushed onto the widgets-on-hand stack.If the order is not completely filled, the order is pushedonto the orders-to-be-filled stack with an updated quantity ofwidgets to be sent out later.Write a class with functions to process the shipments receivedand to process orders.After an order is filled:display the quantity sent out and the total cost for allwidgets in the order.Total number of widgets are currently in the warehouseAlso indicate whether there are any widgets remaining to besent out at a later time.After delivery is processed, display information about eachorder that was filled with this delivery and indicate how manywidgets, if any, were stored in the object pushed onto thewidgets-on-hand stack.Keep track of number of widgets in stock and number of widgetsshipped.With each processed order display details, total cost to thecustomer, profit, cost of widgets to the warehouse, and ordernumber.Make sure each function has a description, post and preconditions.________________________________________________
Expert Answer
Answer to C++ Program Backwards Warehouse Prompt Write Program Handle Flow Widgets Warehouse Warehouse … . . .
OR

