LBS290F Spring 1992 ASSIGNMENT 10 - Inventory Program Due Date: April 27, 1992 11:59 PM The purpose of this program is to track an inventory of a small business. The program will track up to 10 parts with part numbers ranging from 1 to 10. Each line read by the program is an inventory control record. The first number indicates the type of transaction - 1 Stock 2 Sell 3 List. The second number is the part number. The last number is the number of parts bought or sold for type 1 or 2 records. Example input: 1 2 20 Stocked 20 of part 2 2 4 5 Sold 5 of part 4 3 0 0 List the current inventory The program must check for an illegal transaction type. The program must check for an error in the part number. The program also must also not allow product to be sold if there is none in stock. Example execution: $ a.out Enter the inventory control record: 6 0 0 Error - Illegal transaction type 6, please enter number between 1 and 3 Enter the inventory control record: 1 20 90 Error - Part number 20 too large, maximum part number is 10 Enter the inventory control record: 2 4 5 Error - current inventory of part 4 is 0, cannot sell 5 Enter the inventory control record: 1 2 20 Enter the inventory control record: 1 4 10 Enter the inventory control record: 2 2 5 Enter the inventory control record: 3 0 0 PART COUNT ---- ----- 2 15 4 10 Enter the inventory control record: (CTRL-D) Thank you for using the inventory program.