![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 03.04.2020 15:23 56340
Question: One Problem With Dynamic Arrays Is That Once The Array Is Created Using The New Operator The Size Cannot Be Changed. For Example, You Might Want To Add Or Delete Entries From The Array Similar To The Behavior Of A Vector. This Project Asks You To Create A Class Called DynamicStringArray That Includes Member Functions That Allow It To Emulate The Behavior ...
This problem has been solved!
See the answer
One problem with dynamic arrays is that once the array is created using the new operator the size cannot be changed. For example, you might want to add or delete entries from the array similar to the behavior of a vector. This project asks you to create a class called dynamicStringArray that includes member functions that allow it to emulate the behavior of a of strings.
The class should have the following:
1. A private member variable called dynamicArray that references a dynamic array of type string.
2. A private member variable called size that holds the number of entries in the array.
3. A default constructor that sets the dynamic array to Null and sets size to 0.
4. A function that returns size.
5. A function named addEnrty that takes a string as input. The function should create a new dynamic array one element larger than dynamicArray, copy all elements from dynamicArray into the new array, add the new string onto the end of the new array, increment size, delete the old dynamicArray, and then set dynamicArray to the new array.
6. A function named deleteEnrty that takes a string as input. The function should search dynamicArray for the string. If not found, it returns false. If found, it creates a new dynamic array one element smaller than dynamicArray. It should copy all elements except the input string into the new array, delete dynamicArray, decrement size, and return true.
7. A function named getEntry that takes an integer as input and returns the string at that index in dynamicArray. It should return Null if the index is out of dynamicArray
![ansver](/tpl/images/cats/User.png)
Answers: 3
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 02:00
Which software would you use to create a print design? a. illustrator b. audacity c. reaper d. dreamweaver
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 09:10
(328 inc. 448 ind. 480 in25. john has a collection of toy cars. he has 2 red cars, 4 blue cars, 4 black cars, and 6 yellowcars. what is the ratio of red cars to yellow cars? a. 1: 2b. 1: 3c. 1: 626. the net of a right triangular prism is shown below.
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 13:50
Explain how email technologies enable the exchange of messages between users. find out the typical parts of an email address and explain each part.
Answers: 1
You know the right answer?
Question: One Problem With Dynamic Arrays Is That Once The Array Is Created Using The New Operator T...
Questions
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/ekonomika.png)
Business, 07.10.2021 05:20
![question](/tpl/images/cats/en.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 07.10.2021 05:20
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/himiya.png)
Chemistry, 07.10.2021 05:20
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/himiya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 07.10.2021 05:20
![question](/tpl/images/cats/mat.png)
Mathematics, 07.10.2021 05:20
![question](/tpl/images/cats/biologiya.png)
Biology, 07.10.2021 05:20
![question](/tpl/images/cats/istoriya.png)
History, 07.10.2021 05:20
![question](/tpl/images/cats/biologiya.png)
![question](/tpl/images/cats/ekonomika.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 07.10.2021 05:20