Question: COMPLETE THE FOLLOWING C + + PROGRAM FOLLOWING ALL ASSIGNMENT GUIDLINES AND RESTRICTIONS Assignment You will be developing a speeding ticket fee calculator. This program
COMPLETE THE FOLLOWING C PROGRAM FOLLOWING ALL ASSIGNMENT GUIDLINES AND RESTRICTIONS
Assignment
You will be developing a speeding ticket fee calculator. This program will ask for a ticket file, which is produced by a central police database, and your
program will output to a file. Furthermore, your program will restrict the output to the starting and ending dates given by the user.
The ticket fee is calculated using four multipliers, depending on the type of road the ticket was issued:
Interstate multiplier:
Highway multiplier:
Residential multiplier:
None of the above:
The multiplier is multiplied to the difference between the speed limit and the clocked speed to determine the fine's dollar amount.
Console User Interaction
You must ask the user on the console for an input ticket file, an output report file, a report starting date, and a report ending date. The following
prompts must be used:
"Enter a ticket file:
"Enter a report file:
"Enter report start date mm dd yyyy:
"Enter report end date mm dd yyyy: Input File Format
Each line will contain the following information:
$ Restrictions Hints
You must use IO manipulators to force the day to be exactly two digits.
You must use IO manipulators to set the fine to two decimal points.
You must use a constant ARRAY to store and determine the character month.
You must use constants for the fine multiplier.
You must use a switch statement to apply the fine multiplier.
You must use IO manipulators to set the field justifications right andor left
The minimum fine is $ If you calculate a negative fine, you must round it up to exactly $
Do not use a vector
Do not use getline or stringstreams Example
Valid input example:
speeding
Enter a ticket file: tickets.txt
Enter a report file: report.txt
Enter report start date mm dd yyyy:
Enter report end date mm dd yyyy:
The ticket input file contains:
E i
E r
E h
E p
The report output file contains:
Jul $
Dec $
Valid input example:
speeding
Enter a ticket file: inputsoldtickets.txt
Enter a report file: newreport.txt
Enter report start date mm dd yyyy:
Enter report end date mm dd yyyy:
Missing ticket file example:
speeding
Enter a ticket file: somebadfilename
Unable to open somebadfilename.
Missing report file example:
speeding
Enter a ticket file: tickets.txt
Enter a report file: somebadfolderreporttxt
Unable to open somebadfolderreporttxt#include
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
