Bonus: Provide a GUI for your store. You can use the lab of 7/25 as a starting point and hook your "Store" implementation up to this. You can submit this separately from your P3 implementation, and can use the underlying P2 implementation or the P3 implementation. Your choice. Up to 15 points bonus on this assignment.
You are provided with full implementations of three classes and a sample run of the completed program.
Your job:
public ItemByCount() public ItemByCount(String name, String description, int numItems, double pricePerItem) public int getNumItems() public double getCostPerItem() public void setNumItems(int newNum) public void setPricePerItem(double price) public double value() -- should return total value of inventory of that item public void reportInventory() -- should display info about that item -- see sample run public void getData(Scanner k) -- should solicit info needed to specify item public void changeQuantity(Scanner k) -- should report current quantity, solicit new quantity, and update
public ItemByWeight() public ItemByWeight(String name, String description, double pounds, double pricePerPound) public double getPounds() public double getPricePerPound() public void setPounds(double pounds) public void setPricePerPound(double pricePerPound) public double value() -- should return total value of inventory of that item public void reportInventory() -- should display info about that item -- see sample run public void getData(Scanner k) -- should solicit info needed to specify item public void changeQuantity(Scanner k) -- should report current quantity, solicit new quantity, and update
public ItemByVolume() public ItemByVolume(String name, String description, double gallons, double pricePerGallon) public double getGallons() public void setGallons(double g) public double getPricePerGallon() public void setPricePerGallon(double ppg) public double value() -- should return total value of inventory of that item public void reportInventory() -- should display info about that item -- see sample run public void getData(Scanner k) -- should solicit info needed to specify item public void changeQuantity(Scanner k) -- should report current quantity, solicit new quantity, and update