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

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!