Question: In C++ programming Language please Question #1: Speed System Program (6 pts) In this question, you will write a program that determines the penalty of

In C++ programming Language please  In C++ programming Language please Question #1: Speed System Program (6
pts) In this question, you will write a program that determines the
penalty of a driver who is speeding on highway with the speed

Question #1: Speed System Program (6 pts) In this question, you will write a program that determines the penalty of a driver who is speeding on highway with the speed limit of 100km/h based on Ontario Courts. . . Your program should follow the following rules: Prompt the user to enter name, id and score and validates the information. The student name should be entered as "LastName, FirstName" (separated by comma). Please note the whole name should be saved in one string. The driver ID must have 7 digits. The driver's SPEED must greater than 0. If the user enter correct information, your program should display the fine based on the speed. When the fine is displayed, the output should be "FirstName LastName got SPEED. Based on the speed system, FirstName (ID) will pay X." Please note the calculation of X is based on the following rules: A $2.50/km speeding fine for 1-19km/h over the speed limit. A $3.75/km speeding fine for 20-29km/h over the speed limit. A $6.00/km speeding fine for 30-49km/h over the speed limit. 50+ km/h over the speed limit comes with a court decided fine. Your program should be able to ask user for new input of driver's information for penalty until get the input Yes from the user. Display welcome & closing messages. The following are sample screen shots to illustrate the expected behavior of your program. Your + O2 IL Page view A Real program must display the same information with the same format. User input at the keyboard is marked with a red circle. Welcome to Speed System Program! +++++ Please enter your name (Lastname, Firstname seperated by comma): Liu, Tom Please enter your ID without any spaces (7 digits): 9898901 Please enter your speed: 110 Tom Liu got 110. Based on the speed system, Tom (9090901) will pay $25 Exit the program? (enter Yes to exit): No Please enter your name (Lastnane, Firstname seperated by comma): Hans, Lucy Please enter your ID without any spaces (7 digits): 2314612 Please enter your speed: 125 Lucy Hans got 125. Based on the speed system, Lucy (2314512) will pay $93.75 Exit the program (enter Yes to exit): No Please enter your name (Lastnane, Firstname seperated by comma): Thame, Lin Please enter your ID without any spaces (7 digits)12345678 Please enter your speedt 98 Lin Thane got 90. Based on the speed system, you do not need to pay any fine! Exit the program?(enter Yes to exit): Yes Thank you for using Speed System Program! Figure 1 Sample output of Question + CD Page view A Read alou ++ Welcome to Speed System Program! ++++ +++++++ Please enter your name (Lastname, Firstname seperated by comma): Derek, Hulo Please enter your ID without any spaces (7 digits): 123 Please enter your ID without any spaces (7 digits): (1234567 Please enter your speed: 180 Hulo Derek got 180. Based on the speed system, the court will decide your fine!! Exit the program? (entor Yes to exit): No Please enter your name (Lastname, Firstname seperated by comma): Chen, Lily Please enter your ID without any spaces (7 digits): 2131412 Please enter your speed: 120 Lily Chen got 120. Based on the speed system, Lily (2131412) will pay $75 Exit the program? (enter Yes to exit): Yes Thank you for using Speed System Programi Figure 2 Sample output of Question 1

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!