Find maximum velocity and maximum acceleration - write a


Purpose: The purpose of this programming assignment is to give the student experience in using functions, arrays, and strings. Arrays will be used to store and process data and the graphing capabilities of Excel will be used to graph results calculated by the C++ program.

Write a C++ program that will accomplish the following:

1. The program should ask the user which data file is to be used (give an example name and path), read the file name as a string, and open the file using a string variable.

2. The program should read the vehicle number, date, and driver as strings. Also read the values of t and x from the file and store them in arrays. Assume that the data files will contain a maximum of 30 (t, x) data points.

3. Define arrays for velocity (in ft/s), velocity (in mph), and acceleration (in ft/s²). Use a separate function to calculate each of these arrays. For example, the function to find velocity in f/s might be called using Velocity (t,x,v,size) where t and x are input arrays, v is an output array, and size is the number of data points in each array.

4. Write a general function that can be used to find the average of any array. Call this function twice in order to find average velocity (in mph) and average acceleration (in ft/s² or ft/s/s).

For example, the function might be called as follows:

Average = ArrayMean(A, Asize); //function call to find mean value in array A

5. Write a general function that can be used to find the maximum of any array. Call this function twice in order to find maximum velocity (in mph) and maximum acceleration (in ft/s² or ft/s/s).

For example, the function might be called as follows:

Max = ArrayMax(A, Asize); //function call to find max value in array A

6. The output of the program should be sent to a data file (the name of the data file should be specified by the user, but give an example name and path). The output should include:

• The test vehicle number
• The test date
• The driver
• The average velocity in mph
• The average acceleration in ft/s/s
• The maximum velocity in mph
• The maximum acceleration in ft/s/s

• Values for time, distance, velocity (ft/s), velocity (mph), and acceleration (ft/s/s) for each of the data points in the input data files.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Find maximum velocity and maximum acceleration - write a
Reference No:- TGS0963412

Expected delivery within 24 Hours