/** * Write a description of class Inventory here. * * @author (your name) * @version (a version number or a date) */ import java.util.ArrayList; public class Inventory { ArrayList products = new ArrayList(); private static double totalValue; private static int totalQuantity; public double getTotalValue() { return totalValue; } public int getTotalQuantity() { return totalQuantity; } public void addToInventory(Product fresh) { products.add(fresh); totalValue += (fresh.getPrice() * fresh.getQuantity()); totalQuantity += fresh.getQuantity(); } public void removeFromInventory(Product old) { products.remove(old); totalValue -= (old.getPrice() * old.getQuantity()); totalQuantity -= old.getQuantity(); } }