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 :
In the Array implementation of the ListInterface, class AList, do the following:
a pointsAdd 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 ACWCBD with a size of and we call deleteAllC then new updated array would be AWBD with a size of
@param entry The object to be removed from the list.
public boolean deleteAllT entry;
b points put a comment before the deleteAll method and write what is the time complexity of the method you implemented, O On On etc.
c 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
