Question: Overload the remove method the MyList.java as specified below: public void remove(String data) 1. Create a java program named MyList.java then copy and paste the
Overload the remove method the MyList.java as specified below: public void remove(String data) 1. Create a java program named MyList.java then copy and paste the content of MyList.txt 2. Overolad the remove method. 3. Do you see any problem of the implementation of some methods? If so, please fix the problems. 4. Design a driver program named MyListDriver.java to test your list ADT
given
public class MyList{ String[] arr; int loc=0; int capacity; public MyList(int size){ arr=new String[size]; capacity=size; } public boolean isFull(){ return loc==capacity; } public boolean isEmpty(){ return loc==0; } public int size(){ return loc; } public String get(int index){ return arr[index]; } public void print(){ for(int i=0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
