Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a Dynamic Array container with this user interface: ***I know fully well that this same question has been asked, but none of the responses

Create a "Dynamic Array" container with this user interface: 
***I know fully well that this same question has been asked, but none of the responses are correct. If you're going to just copy paste one of those previous answers, just don't answer: I don't want my time wasted any more than you wants yours, thanks.*** 
// Gets the current number of entries in container int getCurrentSize() // Returns the current capacity of the container int capacity() // Checks whether the container is empty. boolean isEmpty() // Adds a new entry to the container boolean insert(newEntry) // Removes an entry from the container and moves all entries above anEntry down one boolean remove(anEntry) // Get index value int getValue(index) // Removes all entries from the container void clear() // Resize a container by doubling current capacity int resize() 
* Implement dynamic resizing using this algorithm: 1. Starting with a dynamic size of 10, if the number of elements exceed this number: a. Reallocate the container size to double the current size b. Move the contents of the current container to the newly sized container c. Delete the previously sized container. 
 Resize C++ Data* ptemp = new Data[capacity*2 ]; for (int i=0; i 
2. Repeat from step 1a. as necessary. 3. Note the data file called "Words.TXT" is in the documents folder for this week. <-- just utilize "word.txt" as file-path, as the .txt file has around 1000 words, and that I know how to handle. 4. Read the data file and store the words in the dynamic array. 

I have started this off in Java, utilizing ArrayList, but I understand C++ as well. I'd prefer explanations in Java however!

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Larry Ellison Database Genius Of Oracle

Authors: Craig Peters

1st Edition

0766019748, 978-0766019744

Students also viewed these Databases questions