Java programming Create a file named StudentArrayList.java , within the file create a class named StudentArrayList. This class is meant to mimic the ArrayList data structure. It will hold an ordered...


Java programming


Create a file namedStudentArrayList.java,within the file create a class named StudentArrayList. This class is meant to mimic the ArrayList data structure. It will hold an ordered list of items. This list should have a variable size, meaning an arbitrary number of items may be added to the list. Most importantly this class should implement the interface SimpleArrayList provided. Feel free to add as many other functions and methods as needed to your class to accomplish this task. In other words, the class StudentArrayList must implement the interface SimpleArrayList. You have to write the code for each of the functions specified in the SimpleArrayList interface. Make sure the class that implements SimpleArrayList is named "StudentArrayList" or else the test code will not compile.


All of the documentation for the function guidelines may be found in the interface. This assignment can be a lot of programming if you do not follow the DRY (Don't Repeat Yourself) programming principle. Though it may look like a lot of work, in reality, it is much less because many methods depend on each other. If you make sure you call other smaller methods in the larger methods you will save your self a lot of time.


You are not allowed to use any 3rd party data structures or libraries such as or anything in the Java.Utils package.


Submit the file named StudentArrayList.java to Grader Than for grading.



Hints:



  • Make an object array (Object[]) as a field. Use the array to store elements added to the class. If an item is removed from the StudentArrayList all items to the right of the item that is removed must be shifted over one place to the left. When the array reaches capacity, you must augment the size of the object array by creating a larger empty array and copying elements from the old array into the new array.

  • Use .equals() to test the equality of elements in the Object array.

  • The size() function should return the total number of added items to the class not the total capacity of the internal array.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here