Question: I need help with java ArrayList menu = new ArrayList (); I got an array list consisting of MenuItem objects. I am supposed to complete

I need help with java

ArrayList menu = new ArrayList<>();

I got an array list consisting of MenuItem objects.

I am supposed to complete two methods:

It should be able to save and restore the menu on demand. So, If there are two items in the menu, the program should be able to save the two items and even if one of the item is deleted later but then the Menu is restored, there should still be two items .

how could I do it?

**** private static void saveInventory(ArrayList menu) {

***** private static ArrayList restoreInventory() {}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!