Grocery List Exercise
In this assignment, you will create a Java program that implements a grocery list. Your program should allow the user to add, remove, get, set, and iterate through the items on the list.
Requirements:
Your program should use an ArrayList to store the grocery items.
Your program should allow the user to add items to the list by typing in the name of the item.
Your program should allow the user to remove items from the list by typing in the name of the item.
Your program should allow the user to get the item at a particular index in the list by typing in the index.
Your program should allow the user to set the item at a particular index in the list by typing in the index and the new item.
Your program should allow the user to iterate through the list by printing each item on the list.
Tips:
You can use the Scanner class to read input from the user.
You can use the for loop to iterate through the items on the list.
Your program should correctly implement all of the requirements. F Your program should be able to perform all of the tasks that are described in the requirements. Your program should be well-documented and use consistent naming conventions.