This program reads input data from a file and analyzes the vertical displacement of a car due to bumps on the road. The program provides two options for analysis: mass analysis and velocity analysis.
ReadData()
: reads input data from a fileCalculateDisplacement()
: calculates the vertical displacement of the car due to a bump on the roadCarTripDisplacement()
: populates an array with the vertical displacement of the car for each bump on the roadWriteData()
: writes output data to a fileMassEffectAnalysis()
: analyzes the effect of varying mass on the displacement of the carVelocityEffectAnalysis()
: analyzes the effect of varying velocity on the displacement of the carPrintData()
: prints the contents of a file to the output console
- The program reads input data from a file using the
ReadData()
function - The program calculates the vertical displacement of the car for each bump on the road using the
CarTripDisplacement()
function - The program writes output data to a file using the
WriteData()
function - The program provides the user with a menu to select between mass analysis and velocity analysis
- If mass analysis is selected, the program analyzes the effect of varying mass on the displacement of the car using the
MassEffectAnalysis()
function and prints the results to the output console using thePrintData()
function - If velocity analysis is selected, the program analyzes the effect of varying velocity on the displacement of the car using the
VelocityEffectAnalysis()
function and prints the results to the output console using thePrintData()
function - The program prompts the user to exit or return to the menu