Suggested Solution

Task 1 Task 2 Task 3

Task 1

A program needs to be written which will add student names to a list of Strings and display the list.

It will then allow students with a certain name to be removed and count how many were removed.

It will then display the result.

Here is some starter code. One of the functions, removeStudents has yet to be implemented.

Start a new project and past this code into the main class file, or paste it into REPLIT.

Using your knowledge of ArrayLists and ArrayList methods, implement and test your design to remove element(s) from an ArrayList.

Hint: look at how the other functions have been implemented.

Don't be afraid to research, too! W3 Schools is great!

Test Data

Populate

James, Joe, Joe, John, Jeremy, Jill, Jed, Joe, quit

search and remove

Joe

Do you get the correct result? There should be no Joe's in the array after processing.

If not, can you figure out what the problem is and how to fix it?