[Solved] C++ program that reads the travelled distance of a car in km (as integer) and the elapsed time in minutes

$25

File Name: C++_program_that_reads_the_travelled_distance_of_a_car_in_km_(as_integer)_and_the_elapsed_time_in_minutes.zip
File Size: 989.1 KB

SKU: [Solved] C++ program that reads the travelled distance of a car in km (as integer) and the elapsed time in minutes Category: Tag:
5/5 - (1 vote)

5/5 – (1 vote)

A local Road Safety Department is tasked with monitoring and issuing speeding tickets and warnings for drivers who violate the 120 km/hr speed limits. Write a complete C++ program that reads the travelled distance of a car in km (as integer) and the elapsed time in minutes (as integer). The program should compute the speed of the car and issue violation ticket if the driver exceeds the speed limit. The program must distinguish between private small vehicles (S large commercial trucks and government owned ones

Your program should perform the following tasks:

Prompt the user to enter the type of the car (S, T, or G).

Prompt the user to enter the travelled distance.

Prompt the user to enter the elapsed time.

Convert the time from minutes to hours. (e.g. 90 minutes = 1.5 hours)

Compute the speed as the travelled distance divided by the time in hours.

Check if the driver violated the speed limit Of 120 km,hr and issue speed violation

ticket/notices/action according to the following table:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] C++ program that reads the travelled distance of a car in km (as integer) and the elapsed time in minutes
$25