This assignment is a continuation of standard deviation assignments and will be an add-on operation to your previous working code to manipulate raw data. The menu program previously created will be expanded to include an additional option (should be 4 all together now) to use dynamically allocated arrays to manipulate data . The new option will be entirely contained in a new separate function of your own design that will include all of the necessary declarations and operations for the assignment.
The function you create will need to declare one or more pointer variables of a new class data type of your own design that will store and manage an x, y coordinate pair and a third value for time, all floating point values. Your class declaration should have a set method that passes the three values into an instance of the variable and a get method to obtain each of the values as a base data type for computation.
In your new assignment function dynamically allocate enough element space for 25 entries of starting and ending data to compute a unit vector based on Cartesian coordinate values. In the file the first set of three values represent the start position and time of measurement and the second set of three values represent the end position and time of the event. Each numeric value will be separated by white space in the source data file. Your code should be able to read and store up to 25 pairs of data and no more. The source data files contain any number of values but only 25 are to be processed.
The new class data type should be a modification from the struct declaration used in assignment 1 but using a class declaration and methods to access the base data type values stored. The functions used for computation should pass copies or references to values of your new data type as one or more parameters and compute distance, direction and speed appropriately.
Your main program function should contain only the menu operations and selection operations to execute the operations for this and the previous assignments (or to exit). The program should be able to perform any of the three assigned operations by selecting the appropriate menu option without restarting the program.
Use the source data file RAW_DATA.TXT from assignment 1 and name the output data file the program creates as PROCESSED_ARRAY.TXT. Data written to file should be the numerical data (x, y, time) for the starting and ending data points and then the direction and speed separated by whitespace. Data written to the video screen should consist of simple headings indicating what the data represents and aligned for easy reading and proper presentation.
Run your completed project exercising the option for this assignment and take a screen shot of the output. Submit your C++ code file (named appropriately with your LAST NAME-HW3 as the first part of the filename) by the due date through the online submission point.
See the additional material on the next page regarding standard formula for conversion of raw data to the vector quantities.
Since the data represents a vector, use the formula supplied below as necessary, to compute the direction (angle) of movement and the speed (distance divided by the elapsed time) and write the original data coordinates, the computed distance, elapsed time, speed and direction to the display and to the output file. The input positional data is a measure in meters and time is measured in seconds.