When all resources for a certain user are requested, information such as a userID might be passed on to the server as part of the request.
Write code in the Customer class of Customer.java to do the following:
- Create a Grocery ArrayList.
- Define a method named getGroceryList that returns the Grocery ArrayList.Use the method signature public ArrayList<Grocery> 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 addGrocery(Grocery grocery)
If the input is:
John
Eggs
5.99
12
y
Oatmeal
8.99
1
n