Question: Programming Fundamentals III Java Data Structures COSC 2436 Lab #2 Bag Implementations That Use Arrays Problem: Complete Programming Project 2, page 92. This will require

Programming Fundamentals III Java Data Structures COSC 2436

Lab #2 Bag Implementations That Use Arrays

Problem:

Complete Programming Project 2, page 92.

This will require that you use the SetInterface of Chapter 1 instead of the BagInterface of Chapter 2. You will add the methods of the interface to the existing class. Then, develop a test application that will verify the functionality of the solution. You may wish to look at the example test applications.

As always, be sure to test ALL methods of the class and interface.

Requirements: You will submit the lab following the normal lab procedures. Make sure to label your lab folder as follows:

2YourLastName

To Be Done:

- Open Resizable ArrayBag and rename as ArraySet.java

- Global replace of Bag with Set

- Re-write add methods to prevent the addition of duplicate entries, using either the contains method or getIndexOf

- We can remove getFrequencyOf method.

- Update the test class replace the testGetFrequencyOf method and add a method to verify that duplicates cant be added

*PDF of the texbook "Data Structures and Abstractions with Java 3rd edition" available upon request

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!