n number of miles per hours (mph) over the speed limit is at least 5 mph. Ticket prices are calculated as follow: base + fee * . The base is always $150 and the fee per mph over the speed limit i

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
icon
Concept explainers
Question
100%

 

THIS PROGRAM MUST BE WRITTEN IN C++!

Your customer needs an automated system to patrol the highways. The job of the system is to collect the following information on vehicles traveling down a certain stretch of highway: license plate number, current speed, and speed limit. A program is required to determine if a speeding ticket is needed for each set of data. Ticket will only be issued when number of miles per hours (mph) over the speed limit is at least 5 mph. Ticket prices are calculated as follow: base + fee * <number of mph over the speed limit>. The base is always $150 and the fee per mph over the speed limit is varied according to number of mph over the speed limit. The fee per mph over the speed limit is $5 when number of mph over the speed limit is no more than 20 mph. However, the fee per mph over the speed limit is $10 when number of mph over the speed limit is between 20 mph and 50 mph. In addition, a ticket of $1000 is automatically given to vehicle when number of mph over the speed limit is more than 50 mph.
You can assume that valid data will be provided, and your program must allow the processing to be repeated until a sentinel value of “QUIT” is entered. It must display percent of ticketed vehicles and average ticket amount. Follow the user-interface as shown below including 2 digits after the decimal point. You must run the following test cases as one run.
[Provide some useful information about AHP program 

including your name, version, and instructions, etc.]

Enter a license plate number --> ABC123<Enter> 

Enter current vehicle’s speed --> 60<Enter> 

Enter speed limit in the zone --> 55<Enter> 

Vehicle travelled 5 miles over the speed limit. 

A ticket of $175 is issued to ABC123. 

 

Enter a license plate number --> 123XYZ<Enter> 

Enter current vehicle’s speed --> 59<Enter> 

Enter speed limit in the zone --> 55<Enter> 

Vehicle travelled 4 miles under the speed limit. 

No ticket is issued to 123XYZ. 

 

Enter a license plate number --> FASTONE<Enter> 

Enter current vehicle’s speed --> 80<Enter> 

Enter speed limit in the zone --> 50<Enter> 

Vehicle travelled 30 miles over the speed limit. 

A ticket of $450 is issued to FASTONE. 

 

Enter a license plate number --> QUIT<Enter> 

Tickets were given to 2 out of 3 vehicles. 

Percent of ticketed vehicles: 66.67% 

Average ticket amount: 312.50 

Thank you for using our AHP program.
Additional Requirements: You must utilize modules/functions in your program. There must be at least 4 modules/functions: program information, input data, calculation, and display results. DO NOT use global variables in your program. Start with the design by identifying the modules/functions, drawing the hierarchy chart, and coming up with the pseudocode for each module/function before attempting your code on the computer. Be sure the follow the user-interface as specified.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Control Structure
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education