Question: Need help implementing this method. All the methods that are in the interface are already implemented. Need help with the last one in both classes

Need help implementing this method. All the methods that are in the interface are already implemented. Need help with the last one in both classes ArrayList and LinkedList  Need help implementing this method. All the methods that are in
the interface are already implemented. Need help with the last one in
both classes ArrayList and LinkedList 2. Consider a member method replaceAll() for

2. Consider a member method replaceAll() for the List ADT that replaces all the instances of an elemente with element f. The method returns the total number of instances replaced. The prototype for the method is as follows: public int replaceAll (E e, Ef) And this method to the interface and implement it for the ArrayList and LinkedList classes. dow Help ArrayList.java List.java * 1 package ciic4020.list; 3 public interface List extends Iterable { INNEGURE covouwn public void add(E obj); public void add(int index, E obj); public boolean remove(E obj); public boolean remove(int index); public int removeAll(E obj); public E get(int index); public E set(int index, E obj); public E first(); public Elast(); public int first Index(E obj); public int lastIndex(E obj); public int size(); public boolean isEmpty(); public boolean contains (E obj); public void clear(); public int replaceAll (E e, E f); 2020 203 @Override public int replaceAll(E e, E f) { 204 return 0; 205 206 207 } }

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 Databases Questions!