/** * GroceryItem Inlab. */ public class GroceryItem { private String name; //item name private double cost; //cost of 1 unit of item // constructor for GroceryItems public GroceryItem(String inName, double inCost) { name = inName; cost = inCost; } // returns the item's name public String getName() { return name; } // returns the cost of 1 item public double getCost() { return cost; } }