Modifying the Inventory Program The files UpdateInventory.java and InventoryItem.java are modifications of Listings 8.7 and 8.8 in the text. Currently UpdateInventory does the same thing the CheckInventory program in Listing 8.7 does -- it reads a list of inventory items in from a file (the file inventory.dat), stores them in an array of objects of type InventoryItem and then prints the contents of the array. Compile and run the program to see how it works. In this exercise you will modify the program to "restock" the inventory then write the revised inventory data back to the inventory.dat file. To restock the program will read in (from standard input) the number of additional units of each item then add that number to the current number of units (the instance variable units in the InventoryItem class). To accomplish this, the InventoryItem class has four methods that are not included in Listing 8.8. They are * restock -- which takes a single parameter representing the number of units of the item to be added to the inventory. That number is added to the units instance variable. * three accessor methods getName, getUnits, and getPrice that return the name, number of available units, and the price, respectively, of the inventory item Modify UpdateInventory.java as follows: 1. In the loop before the current println statement, a. Prompt for the number of additional units of the item (use the getName method in the prompt so the user knows the name of the item). b. Read the number in (use the InputStreamReader and BufferedReader classes.) c. Update the units of the item in inventory (use the restock method). 2. Compile and run what you have so far. 3. Now add code to write the inventory back to the inventory.dat file. To do this, a. Set up the output file stream (Listing 8.9 contains an example) before the loop (but after the file for reading has been closed). b. In the loop, write the item to the output file in the same format as the original input file (use the accessor methods). c. Close the output file stream after the loop. 4. Compile and run the program. Look at the contents of file inventory.dat to make sure the file has been updated.