Question: Write a program that does the following : 1 . In the Array implementation of the ListInterface, class AList, do the following: a . [

Write a program that does the following :
1. In the Array implementation of the ListInterface, class AList, do the following:
a.[50 points]Add and implement he following method:
/** delete all occurrences of object entry from the list; if object found delete all occurnces of the object from the list and return true; if object not found return false.
Note, make sure the order of the array is maintained, example if array was A,C,W,C,B,D with a size of 6 and we call deleteAll(C), then new updated array would be A,W,B,D with a size of 4
@param entry The object to be removed from the list.
**/
public boolean deleteAll(T entry);
b.[20 points] put a comment before the deleteAll method, and write what is the time complexity of the method you implemented, O(1), O(n), O(n^2), etc.
c.[30 points] add a main method to this class to test the deleteAll method works when the object to be removed occurs multiple times in the list (print the list before the test then print the list after the test) and also test it when the object to be removed is not in the list, (print the list before the test then print the list after the test)
Please use Java.

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!