You have been hired by a bookstore to provide them a system that can maintain the costs of up to 3 different book titles; its a small bookstore. The owners would like to be able to do the following:
- 1. Enter the names of 3 books.
2. Enter the cost of each book being maintained.
- Enter the quantity of each book
- Calculate the total value of each book title
5. Provide the total costs of inventory (total of all the books in inventory see formula)
- Provide the average cost of inventory of all books
Total Value of each book = Cost * Quantity
Total Inventory = (Sum of (Cost * Quantity) of each book)
(i.e. multiply the cost of each book by the quantity entered and add all these to obtain the total cost of inventory)
Average Cost of Inventory = Total Inventory Total Quantity of Books
Assume the following: 3 names and costs were entered.
The input/output for each of the respective requirements should be similar to (assumes all 3 books were entered):
The list of inventory is:
Book Title Cost Quantity Inventory Value
1. Fury $ 24.12 2 $ 48.24
2. Little Women $ 5.00 3 $ 15.00
- War and Peace $ 27.00 1 $ 27.00
The total cost of inventory is: $ 90.24
The average cost of inventory: $ 30.08.
Reviews
There are no reviews yet.