I want the flow chart for this

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section4.5: A Case Study: Solving Quadratic Equations
Problem 7E
icon
Related questions
Question
I want the flow chart for this
PartI:
Exercise 1:
A local Road Safety Department is tasked with monitoring and issuing speeding tickets and
warnings for drivers who violate the 120 km/hr speed limit. 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 ('T'), and government owned ones (*G').
Your program should perform the following tasks:
o Prompt the user to enter the type of the car (S, T, or G).
O Prompt the user to enter the travelled distance.
o Prompt the user to enter the elapsed time.
Convert the time from minutes to hours. (e.g. 90 minutes = 1.5 hours)
o Compute the speed as the travelled distance divided by the time in hours.
O Check if the driver violated the speed limit of 120 km/hr and issue speed violation
ticket/notices/action according to the following table:
Speed
Speed Violation fee
T
G
Between 120 and 140
10 OMR
20 OMR
Notify the
km/hour
government
institution of the
Between 140 and 160
30 OMR
60 OMR
km/hour
violation
More than 160 km/hour
50 OMR, and
100 OMR, and
driver's license is
driver's license is
suspended
suspended
O OMR (No violation)
Less than or equal to 120
A. C:\WINDOWS\system32\cmd.exe
Alsalam Alaikum
Welcome to the Speeding Ticketing System
Please enter car type
[S: Small; T: Trucks; G: Government]
((or any other character to cancel)): S
Please enter the distance travelled by the car: 120
Please enter the travelled time in minutes: 40
The car travelled 120 km in 0.666667 hr.
The car was over speeding by 60 km/hr, and his/her fine is 50 OMR
Driver's licence is suspended
report to the department
....
Thanks, Good Bye ......
Press any key to continue
Transcribed Image Text:PartI: Exercise 1: A local Road Safety Department is tasked with monitoring and issuing speeding tickets and warnings for drivers who violate the 120 km/hr speed limit. 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 ('T'), and government owned ones (*G'). Your program should perform the following tasks: o Prompt the user to enter the type of the car (S, T, or G). O Prompt the user to enter the travelled distance. o Prompt the user to enter the elapsed time. Convert the time from minutes to hours. (e.g. 90 minutes = 1.5 hours) o Compute the speed as the travelled distance divided by the time in hours. O Check if the driver violated the speed limit of 120 km/hr and issue speed violation ticket/notices/action according to the following table: Speed Speed Violation fee T G Between 120 and 140 10 OMR 20 OMR Notify the km/hour government institution of the Between 140 and 160 30 OMR 60 OMR km/hour violation More than 160 km/hour 50 OMR, and 100 OMR, and driver's license is driver's license is suspended suspended O OMR (No violation) Less than or equal to 120 A. C:\WINDOWS\system32\cmd.exe Alsalam Alaikum Welcome to the Speeding Ticketing System Please enter car type [S: Small; T: Trucks; G: Government] ((or any other character to cancel)): S Please enter the distance travelled by the car: 120 Please enter the travelled time in minutes: 40 The car travelled 120 km in 0.666667 hr. The car was over speeding by 60 km/hr, and his/her fine is 50 OMR Driver's licence is suspended report to the department .... Thanks, Good Bye ...... Press any key to continue
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Datatypes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,