Question: Lab Assignment : Part 1. Write and interface ContainerADT.java for the bag container using generics. The characteristics of the bag container are provided in the

Lab Assignment :

Part 1. Write and interface ContainerADT.java for the bag container using generics. The characteristics of the bag container are provided in the ContainerADT.pdf file. You will find there the description of methods that should be included in the interface.

Part 2. Write an ArrayContainer.java class that implements the interface ContainerADT using an array. Use generics. Write two constructors: a default constructor that creates a container for 100 elements and a constructor that creates a container using the capacity received by parameter. When implementing method remove, make sure to deal with the empty spots in the array created by the remove operation.

Part 3. Write an EmptyContainerException class.

Part 4. Test the ArrayContainer class using the provided Test.java. You may have to add more test to the provided Test.java application in order to test all methods from the array container). You may also run the memory game for fun.

If the memory game doesn't work properly go back and examine your code in the ArrayContainer class. You may also use the debugger in Netbeans to examine your code.

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!