Question: Program Project: 1 . Consider a text file named scores.txt that contains player scores for a game. A possible sample is shown where Ronaldo's best

Program Project: 1. Consider a text file named scores.txt that contains player scores for a game. A possible sample is shown where Ronaldo's best score is 10400. Fluff's best score is 9800, ect. Ronoldo10400Fluff9800Pele12300Kaka8400Christiano8000Create a class object using separate .h and .cpp files containing a methids named gethighScire that takes a string reference parameter and an integer reference parameter. The method should scan through the file and set the reference parameter to the name of the player with the highest score and the corresponding score. 2. One problem with dynamic arrays is that once the array is created using the mew 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 askes you to create a class called DynamicStringArray that includes member functions that allow it to emulate the behavior of a vector of string. The class should have the following: 1. A private member variable called dynamicArray that references a dynamic array of type string.2. A number private member variable called size that holds the number if entries in the array3. A default constructor that sets the dynamic array to nullptr and sets the size to 0.4. A method that returns the size.5. A method named addEntry that takes a string as input. The method creates a new dynamic array one element larger that the dynamic Array, copy the old elements and add the new string and updating the size and points to the new dynamic Array.6. A method named deleteEntry that takes a string as input. The method creates a new dynamic array one element smaller and copies the remaining elements returning a pointer to the new array.7. A method named getEntry that takes an integer returning the string at that index. Return a nullptr if the index is out of bounds.8. A copy constructor allowing for the instance to be based on an existing object's entries.9. Overloaded assignment operator to perform a "deep copy" so the assigned object contains it's own copy and not point to the same location10. Destructors as appropriate.
Must be in C++ and also include the names and scores

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!