Question: DynArray.java A very simple class which models some of the functionality of the Java ArrayList. This class is not complete and must be modified as

DynArray.java A very simple class which models some of the functionality of the Java ArrayList. This class is not complete and must be modified as such:

Write the method body for the default constructor

Write the method body for the method arraySize()

Write the method body for the method elements()

Write the method body for the method grow()

Write the method body for the method shrink()

DynArrayDriver.java A simple driver class to test your DynArray class, you must write this class from scratch.

Once you have completed the requirements:

Make sure that your program runs without errors or warnings.

What i got so far: public class DynArray { private double[] array; private int size; private int nextIndex; public int arraySize() {

} public int elements() {

} public DynArray() {

} private void grow() {

} private void shrink() {

} }

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!