CSC1110 - Week 9 Exercise
Overview
In this exercise, you will get more practice with arrays by implementing operations like indexOf(), remove(), and add(). You will then practice using those methods of the ArrayList class.
Instructions
Create an IntelliJ project using the GitHub link provided by your professor. Implement the methods based on the provided JavaDoc. See the sample output for what the fixed code should produce. You can not use methods of the Java Arrays class.
Sample Output 1
Part1: Using custom methods for an Array Array of Strings [foo,cat,bar,cat] Index of first occurrence of cat 1 Index of first occurrence of taco -1 List after removing element at index 1 [foo,bar,cat] List after adding taco at index 2 [foo,bar,taco,cat] Part2: Using builtin methods for an ArrayList ArrayList of Strings [foo, cat, bar, cat] Index of cat is 1 Index of taco is -1 List after remove element from index 1 [foo, bar, cat] List after adding taco at index 2 [foo, bar, taco, cat] Process finished with exit code 0
Submission Instructions
Commit and Push your files to GitHub Classroom.