Question

In: Computer Science

For a car that travels 70 mph for 60 miles and then 80 mph for 60...

For a car that travels 70 mph for 60 miles and then 80 mph for 60 miles. The total time traveled is given by calculating the distance per rate traveled for each part and then summing the values. •Have the program in c++ that calculates the most appropriate mean rate of the two different rates and the two equal distances, and output the result to the text file. The “best” mean rate is the rate at which T=D/R is same as if you did it separately where D is the total distance. Output all the data to the text file (include expected results on the display screen).•Example: The program should print something like•A car travels 40mph for 10 miles and 50 mph for 10 miles.•The total time traveled given by T=D1/R1 + D2/R2 is [your answer].•The best mean rate R is [your answer].•The total time given by this mean and T=D/R is [your answer]

Solutions

Expert Solution

My file name is file.txt u can change it accordingly.


Related Solutions

Your car gets 25 miles per gallon (mpg) at 60 miles per hour (mph) and 18...
Your car gets 25 miles per gallon (mpg) at 60 miles per hour (mph) and 18 mpg at 70 mph. At what speed should you make a 600-mile trip: 1. If gas costs $3 per gallon and your time is worth $12 per hour? 2. If gas costs $4 per gallon and your time is worth $15 per hour? 3. If gas costs $5 per gallon and your time is worth $10 per hour? 4. Build a spreadsheet to calculate...
Your car gets 29 miles per gallon (mpg) at 60 miles per hour (mph) and 25...
Your car gets 29 miles per gallon (mpg) at 60 miles per hour (mph) and 25 mpg a 70 mph. At what speed should you make a 525-mile trip: If gas costs $3 per gallon and your time is worth $18 per hour If gas costs $4 per gallon and your time is worth $12 per hour If gas costs $5 per gallon and your time is worth $9 per hour
Consider a car traveling on a highway. If the car travels 100 miles in 2 hours,...
Consider a car traveling on a highway. If the car travels 100 miles in 2 hours, which theorem guarantees that the car must have been traveling at 50 mph at some point in those two hours? (You may assume position and velocity are continuous and differentiable)
5. Speed (mph) Braking Distance (ft) 30 40 50 60 70 80 48 79 123 184...
5. Speed (mph) Braking Distance (ft) 30 40 50 60 70 80 48 79 123 184 243 315. Find the Sx, Sy, Find correlation coefficient, regression line y.
Your car gets 22 miles per gallon (MPG) at 55 miles per hour (MPH) and 18...
Your car gets 22 miles per gallon (MPG) at 55 miles per hour (MPH) and 18 MPG at 65 MPH. At what speed should you make a 450-mile trip 1. If gas costs $2.95 per gallon and your time is worth $17/hour? 2. If gas costs $3.80 per gallon and your time is worth $11.5/hour? 3. If gas costs $4.75 per gallon and your time is worth $8.9/hour? 4. Building an Excel spreadsheet to calculate the total trip cost for...
A Honda N Box car is traveling on the highway at 70 mph (112.6 km/hr). It...
A Honda N Box car is traveling on the highway at 70 mph (112.6 km/hr). It is a nice summer day with no breeze and the temperature outside is 77F (25C, density = 1.184 kg/m^3, kinematic viscosity = 1.562*10^-5 m^2/s). The roof of the N Box car is 1478 mm wide and 3395 mm long. Determine how far above the car a bug must fly in order to NOT be affected by the passing car (unit: meters) **accurate to 3...
When traveling 40 mph (miles per hour), the distance that it takes Fred’s car to stop...
When traveling 40 mph (miles per hour), the distance that it takes Fred’s car to stop varies evenly between 120 and 155 feet. (This includes the reaction distance and the braking distance.) All of the questions are related to the stopping distance when Fred is traveling 40 mph. a) Let S be the distance it takes for Fred’s car to stop at when traveling 40 mph. Find the distribution, parameter(s), and support of S. b) What is the probability that...
A boat leaves the harbor entrance and travels 27 miles in the direction ??? ° ?....
A boat leaves the harbor entrance and travels 27 miles in the direction ??? ° ?. The captain then travels for another 16 miles in the direction ??? ° ?, which is the boat’s final position. How far is the harbor entrance from the boat’s final position? What is the bearing of the boat from the harbor entrance? Round your answers to the nearest WHOLE numbers.
Create an application that calculates mph or (Miles Per Hour). There should be 2 textboxes for...
Create an application that calculates mph or (Miles Per Hour). There should be 2 textboxes for input, and 2 labels to label the input textboxes. The first textbox should be the miles driven. And the other textbox should be hours taken. There should be a button to calculate miles per hour. And a label or textbox for the results of the calculate. 1textbox for miles [input] 2textbox for hours (time used) [input] 3label for miles textbox 4label for hours textbox...
will the acceleration of a car with the same when the car travels around a sharp...
will the acceleration of a car with the same when the car travels around a sharp curve at a constant 60km/hr as when it travels around a gentle curve at the same speed explain?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT