Question: In this assignment, you will write a C + + program that performs some basic physics calculations. You will prompt the user for the number

In this assignment, you will write a C++ program that performs some basic physics calculations. You will prompt the user for the number of seconds an object has been falling. You will then calculate the distance it has traveled in that time, and how fast it is moving. You will output these results.
Input specification
The program should prompt the user to enter the name of the object and the number of seconds an object has been falling. This should be a floating point number.
The program's formatting should appear exactly as shown in the sample interaction.
Output specification
After obtaining the number of seconds and performing the calculations, the program should display the results for each result: distance traveled and speed. The program's formatting should appear exactly as shown in the sample interaction.
User interaction specifications
The program should display a welcome message to the user.
Prompt the user to enter the name of the object.
Prompt the user to enter the number of seconds an object has been falling.
Calculate the results for distance traveled and instantaneous speed by using the following formulas:
Distance Traveled
d=12gt2
Instantaneous Speed
v=gt
Use the value of 9.807ms2 for the value of g. You should set this as a constant.
Display the results in the format shown in the sample interaction below.
Sample interaction
$ g++ $CXXFLAGS pa02b.cpp -0 pa02b
$.? pa02b
Welcome to the Falling Object Calculator!
What object is falling: ball
Enter the number of seconds the object has been falling: 3.5
In 3.5 seconds, the ball has fallen: 60.0679 meters The ball is traveling at a speed of: 34.3245 meters per second $
Note: The $ character represents your shell prompt and should not be printed by your program.
Specific program requirements
 In this assignment, you will write a C++ program that performs

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!