An engineer keeps an inventory of car parts, but on paper. The usual operations on his inventory database include adding
An engineer keeps an inventory of car parts, but on paper. The usual operations on his ‘inventory database’ include adding new parts, updating levels of current stock and producing different reports based on the current stock levels. As the inventory is getting larger, this manual system is becoming difficult to manage. The engineer decided to develop a computerized system to help him manage the inventory. As he is not expert in database management systems, he decided to develop his own application, based on the C++ knowledge he had during his early engineering education. The parts data are printed as in the following table:
Phase1: Within the main function do the following:
You are required to help this engineer by developing the Inventory Control System. Your system should perform the following operations:
Add a new item that asks the user to input data of a new part and then add the data to the parts file.
List the current inventory in a tabular format (begin with the part No followed by the Part Name). In the last column of this list show the total price of each item (i.e. price*quantity).
Produce lists of the following:
o All items whose quantity field < 5.
o All items whose price is greater than a value provided by the user.
o All items whose price is greater than the average item price.
o Stock statistics such as: the current value of the stock (sum of price*quantity), the average price, the most expensive item, the least expensive item, the least stocked item