this is the book name Data Structures and Abstractions with

this is the book name. Data Structures and Abstractions with Java

1) Description: The sample programs in Chapter 1 of your textbook are not complete. They are used for illustration purpose only. The implementation of Listing 1-1 on page 39 is explained in Chapter 2. And, in order to see the result of using it, we will need the following set of files:

i. BagInteface.java – the specification only.

ii. ArrayBag.java – the implementation of BagInerface.java.

iii. ArrayBagDemo.java – a sample program to show us how to use the Bag Interface.

2) Assignment: Download and run the above mentioned programs to ensure they work properly. Study the code and make necessary changes so that the program will run according to the following:

i. Default capacity is 5.

ii. When the current capacity is full, increment the capacity by 3 and resize the array accordingly. [Might need to modify Add method, and use ArrayList to increase the capacity by 3 everytime max capacity is full]

iii. There is no capacity limit.

here are the demo program

Array bag.java // these is the next file

Solution

Array bag.java // these is the next file

this is the book name. Data Structures and Abstractions with Java 1) Description: The sample programs in Chapter 1 of your textbook are not complete. They are u

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site