Question: Objectives . Be able to use ArrayList. Task: Write a program that uses an ArrayList to manage a namelist. o In the main method, create

 Objectives . Be able to use ArrayList. Task: Write a program

Objectives . Be able to use ArrayList. Task: Write a program that uses an ArrayList to manage a namelist. o In the main method, create an ArrayList object that can hold only String object. o Read the following name list from a file to an ArrayList. There is no need to keep track of the number of items that have been added to the list. Jillian Gagandeep Kari Darius Sierra Jarrell Harvey Camron Brittney Victor o Print the namelist on Screen (use toString method of the ArrayList Class) and display how many items in the list. o Write code to add "Michael" to the end of the list. Print a relevant message and current namelist. o Write code to add "Lucy" to the list in position 2. Print a relevant message and current namelist. o Write code to find "Michael" in the list (indexOf method of the ArrayList Class) and replace it with "Mike". Print a relevant message and current namelist. o Ask the user for a name to delete from the list. If the name was not found in the list, print a message saying that the name was not in the list. If it was found, delete the name, print a relevant message and current namelist

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 Programming Questions!