Inventory Program Part 2-Java. Modify the Inventory ProgramInventory Program Part 2-Java. Modify the Inventory Program

Inventory Program Part 2-Java. Modify the Inventory Program so the application can handle multiple items. Use an array to store items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the proce of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory. Create a method to calculate the value of the entire inventory. Create another method to sort the array items by the name of the product.

Inventory Program Part 2 Modify the Inventory Program so the application can handle multiple items. Use an array to store the items. The output should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price of each unit, and the value of the inventory of that product. In addition, the output should display the value of the entire inventory. Create a method to calculate the value of the entire inventory. Create another method to sort the array items by the name of the product. Post as an attachment This should be a text file with a .java extension. public class Product { private int number; private String name; private int units; private double price; // constructor public Product(int number, String name, int units, double price) { this.number = number; this.name = name; this.units = units; this.price = price; } // value of this product public double calculateInventory() { return price*units; } /** * returns the number */ public int getNumber() { return number; } /** * sets the number */ public void setNumber(int number) { this.number = number; } /** * returns the name */ public String getName() { return name; } /** * sets the name */ public void setName(String name) { this.name = name; } /** * returns the units */ public int getUnits() { return units; } /** * sets the units */ public void setUnits(int units) { this.units = units; } /** * returns the price */ public double getPrice() { return price; } /** * sets the price */ public void setPrice(double price) { this.price = price; } // returns it as a string public String toString() { return String.format( %03d %-10s %3d $%6.2f $%7.2f, number, name, units, price, calculateInventory()); } }// stores a collection of