Question: JAVA please. Create 3 different types of ArrayBags. Make on bag of type integer, one of type string and the other one of type item.
JAVA please.
Create 3 different types of ArrayBags. Make on bag of type integer, one of type string and the other one of type item. Test all these bags executing alll the methods in BagInterface (expect toArray)
* BagInterface.java
public interface BagInterface
{
public int getCurrentSize();
public boolean isEmpty();
public boolean add(T newEntry);
public T remove();
public boolean remove(T anEntry);
public void clear();
public int getFrequencyOf(T anEntry);
public boolean contains(T anEntry);
public T[] toArray();
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
