Question: java code Part 1.Solving using an ArrayList and its inbuilt methods ( 10 points): Write a Java program and do the following steps: (one-by-one) a)
Part 1.Solving using an ArrayList and its inbuilt methods ( 10 points): Write a Java program and do the following steps: (one-by-one) a) Create an ArrayList and add the following names: i. Xiu Wang ii. Jackson Robin iii. Samantha Kelly iv. Yusuf Khan v. Hannah Taylor vi. Amaya Jones b) Display your ArrayList using any one of the three cursors (Enumeration, Iterator or ListIterator) c) Ask the user to enter a new name and get the user input. d) Add the user's name into the ArrayList and display the ArrayList. e) Ask the user to select a name from the ArrayList to be removed. f) Receive the user's input and remove the corresponding name from the ArrayList and display the resulting ArrayList. g) Ask the user to select a name from the ArrayList and also to provide an alternative name to be replaced with the selected name. h) Receive the user input and replace the selected name with the new name. (You must perform replace operation and should not perform remove). i) Display the ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
