Question: Write code in the Customer class of Customer.java to do the following: Java Create a Grocery ArrayList. Define a method named getGroceryList that returns the
Write code in the Customer class of Customer.java to do the following:
Java Create a Grocery ArrayList.
Define a method named getGroceryList that returns the Grocery ArrayList.
Use the method signature public ArrayList getGroceryList
Define a method named addGrocery with a Grocery parameter variable.
The addGrocery method should add a Grocery object to the Grocery ArrayList via the parameter.
Use the method signature public void addGroceryGrocery grocery
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
