Inventory Intermediate version
If you complete this version co
ectly, you will receive up to a 89% (B)
Complete (and submit) the basic version first. Then, create a new version adding the following to basic version:
The input file will have 2 new items at the end of each line:
sold – The number of these items sold in past month
minimum – the level of inventory at which the item should be restocked (buy more from your vendor)
Output this new data in columns in the output file, along with new columns called “profit” and “left”
Write a method to determine profit, sending the method the values of cost, price, and sold. It should return the amount of profit made.
The “left” column should be the (quantity – sold), that is the number of items left in inventory.
Create a new output file named “reorder.txt”. It will have listed the items whose left amount is <= the target amount. Include the name, quantity, sold, target
and left amounts. It, too, should be formatted in tabular form with a title row.
Summary data should also include total profit and # of items to be reordered.
Sample input file:
thingy XXXXXXXXXX
Whatchacallit XXXXXXXXXX
gizmo XXXXXXXXXX
Should produce an output file:
XXXXXXXXXXItem Quantity Cost (W) Markup % Price(R) Value (W) Value (R) Sold Target profit Left
--------------------------------------------------------------------------------------------------------------------
XXXXXXXXXXthingy XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
Whatchacallit XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXXgizmo XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX
And a reorder file:
XXXXXXXXXXItem Quantity Sold Target Left
-----------------------------------------------------
Whatchacallit XXXXXXXXXX XXXXXXXXXX
XXXXXXXXXXgizmo XXXXXXXXXX XXXXXXXXXX
And summary data:
Total value of all items:
Wholesale: $5355.71
Retail: $6933.55
# of different items: 3
Total # of items: 91
Total Profit: $743.15
# of items needing reorder: 2