Inserting, updating and removing items from an ArrayList
Chapter 7.13 ArrayLists
Write a program that presents a menu to the user that allows basic inserting, updating and removing a list of names from an array list. Continue these options until the user enters the exit number. The program should have at least the following functions:
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 1
Enter a name
Name 1
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 1
Enter a name
Name 2
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 1
Enter a name
Name 3
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 1
Enter a name
Name 4
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 4
Names in List
[0] Name 1
[1] Name 2
[2] Name 3
[3] Name 4
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 2
Names in List
[0] Name 1
[1] Name 2
[2] Name 3
[3] Name 4
Enter a number to edit
1
Enter new Name
Name 2 new
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 4
Names in List
[0] Name 1
[1] Name 2 new
[2] Name 3
[3] Name 4
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 3
Names in List
[0] Name 1
[1] Name 2 new
[2] Name 3
[3] Name 4
Enter a number to delete
2
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 4
Names in List
[0] Name 1
[1] Name 2 new
[2] Name 4
Name List Menu
1. Add a name
2. Edit a name
3. Delete a name
4. Display names
5. Quit
Enter Choice: 5