0
/ 1.0
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem { private double price; public...
For this question you will be using FoodItem
objects and one GroceryBag
object.
public class FoodItem
{
private double price;
public FoodItem(double p)
{
this.price = p;
}
public double getPrice()
{
return price;
}
}
The method below finds the food item with the highest price. Finish the body of this for-each loop to make that happen!
Your feedback will appear here when you check your answer.