One problem with dynamic arrays is that the created once array is using the might want to add or delete entries from the array. This project asks new operator the size cannot be changed. For example, you you to create a class called DynamicStringArray that includes member functions that allow it. The class should have the following private member variables dynamicArray that references a dynamic array of type string. size that holds the number of entries in the array. The class should have the following public methods: A default constructor that sets the dynamic array NULL and to sets size to 0. A function sizeIs that returns size. as input. The one element larger A function named addEntry that takes a string new dynamic array than dynamicArray, copy all elements from dynamicArray into the function should create a add the new string onto the end of the new new array, array, increment size, delete the old dynamicArray and then set dynamicArray to the new array. A function named deleteEntry that takes a string as input. The function should search dynamicArray for the string. If not found, new dynamic array one it returns false. If found, it creates a element smaller than dynamicArray. It should copy all elements except the input string into the new array, delete dynamicArray , decrement size, and return true. an integer in dynamicArray. return NULL if the index is out of dynamicArray's bounds. A function named getEntry that takes as input and returns the string at that index It should A destructor that frees up the memory allocated to the dynamic array. printDynamicArray () that displays the elements of the dynamicArray Instructions: You will be given 3 files: DynamicStringArray.h (Do not modify) DynamicStringArray.cpp (to be competed) main.cnn (Do not modify)
One problem with dynamic arrays is that the created once array is using the might want to add or delete entries from the array. This project asks new operator the size cannot be changed. For example, you you to create a class called DynamicStringArray that includes member functions that allow it. The class should have the following private member variables dynamicArray that references a dynamic array of type string. size that holds the number of entries in the array. The class should have the following public methods: A default constructor that sets the dynamic array NULL and to sets size to 0. A function sizeIs that returns size. as input. The one element larger A function named addEntry that takes a string new dynamic array than dynamicArray, copy all elements from dynamicArray into the function should create a add the new string onto the end of the new new array, array, increment size, delete the old dynamicArray and then set dynamicArray to the new array. A function named deleteEntry that takes a string as input. The function should search dynamicArray for the string. If not found, new dynamic array one it returns false. If found, it creates a element smaller than dynamicArray. It should copy all elements except the input string into the new array, delete dynamicArray , decrement size, and return true. an integer in dynamicArray. return NULL if the index is out of dynamicArray's bounds. A function named getEntry that takes as input and returns the string at that index It should A destructor that frees up the memory allocated to the dynamic array. printDynamicArray () that displays the elements of the dynamicArray Instructions: You will be given 3 files: DynamicStringArray.h (Do not modify) DynamicStringArray.cpp (to be competed) main.cnn (Do not modify)
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY