Acceleration is the rate at which an object changes its velocity. It is typically represented by symbol a and measured in m/s2 (meters per second squared).
Write the algorithm (steps in pseudocode) and the corresponding program to calculate the acceleration of a vehicle given the speed in miles per hour and the time in seconds. Use the formula provided below to calculate the acceleration in meters per second squared.
The program must prompt the user to enter a velocity in miles per hour and a time in seconds (real numbers) and then display the resulting acceleration as a real number. The acceleration must be rounded off to one decimal digit but displayed with two decimal digits.
Acceleration formula: a = 1609/3600 x v/t
a: acceleration in meters per second squared
v: velocity in miles per hour
t: time in seconds
Mandatory:
1. Use a constant MPH2MPS = 1609/3600 for converting from miles per hour to meters per second.
2. Use the function learned in class to round off the acceleration.
3. Use appropriate data types for variables and constants.
4. Display the output formatted as in the example shown below.
Review the examples discussed in class, the lab assignments are done so far, and the Programming Examples in the tutorial to get an idea of what you need to do. The algorithm must be written in pseudocode and should look like my lab handouts. Include your algorithm in the source code as comments.
Sample run of the program
Acceleration calculator
Please enter the velocity in miles per hour: 60
Please enter the time in seconds: 6
The acceleration required by a vehicle to reach a velocity of 60.00 miles per hour in 6.00 seconds is 4.50 meters per second squared
IMPORTANT:
For your reference on how the program should interact with the user, I am providing sample runs of my solution. Run your program with the same values I use in CSCI 1380 Summer II 2021 Mr. Gustavo Dietrich them and make sure your program behaves similarly to mine (pay attention to the values calculated).
Your program must be well commented, use meaningful identifiers, use the constant.
Do not hesitate to use the corresponding forum in Discussions to post your questions/doubts about this assignment. I will reply as soon as I can.
Your program must have the following comments at the top:
Your full name
Partner’s full name (ONLY if you worked with a partner)
(Brief description of what the program does)
Sample runs of my solution
Acceleration calculator
Please enter the velocity in miles per hour: 60
Please enter the time in seconds: 4.5
The acceleration required by a vehicle to reach a velocity of 60.00 miles per hour in 4.50 seconds is 6.00 meters per second squared
Acceleration calculator
Please enter the velocity in miles per hour: 73.
2 Please enter the time in seconds: 5.23
The acceleration required by a vehicle to reach a velocity of 73.20 miles per hour in 5.23 seconds is 6.30 meters per second squared
Acceleration calculator
Please enter the velocity in miles per hour: 55
Please enter the time in seconds: 6
The acceleration required by a vehicle to reach a velocity of 55.00 miles per hour in 6.00 seconds is 4.10 meters per second squared
Acceleration calculator Please enter the velocity in miles per hour: 60
Please enter the time in seconds: 6
The acceleration required by a vehicle to reach a velocity of 60.00 miles per hour in 6.00 seconds is 4.50 meters per second squared
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme