Question: This program determines the value of the inventory. It should read stock.txt and display each inventory item and its quantity in stock. The program should
This program determines the value of the inventory. It should read stock.txt and display each inventory item and its quantity in stock. The program should also prompt the user to enter theunit value of each item, and then calculate and display the inventory value of that item. After all inventory items on file have been processed, the program should report the total value of the inventory. NOTE: All currency output should display two decimals with the $ sign immediately before the first digit. See sample output below, and note how it relates to the output of program6_1 above.
Sample Output 
hammer quantity in stock: 12 Enter theunit value for this item 12.99 Item claw hammer has a value of $155.88 locking pliers: quantity in stock:9 Enter the unit value for this item 10.79 Item locking pliers has a value of $97.11 adjustable wrench quantity in stock 15 Enter the unit value for this item 13.95 Item adjustable wrench has a value of $209.25 phillips screwdriver : quantity in stock: 10 Enter the unit value for this item 4.59 Item phillips screwdriver has a value of $45.90 Inventory total value is $508.14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
