2023 C only Computing the fine for a speeding ticket Students will write an application to | Assignment Collections

Computer Science 2023 Computing The Fine For A Speeding Ticket

2023 C only Computing the fine for a speeding ticket Students will write an application to | Assignment Collections

C++ only.

 

Computing the fine for a speeding ticket

Students will write an application to calculate speeding ticket fines for any number infractions. For each ticket, the input to this program will be the following (1) actual speed, (2) speed limit, (3) whether the offense occurred in a work zone, in a residential district, or not and (4) the court fees. The court fees are the same through the run, it is asked to the user only once. The output should show the total amount for the ticket. Once one total fine has been computed, the user should be given the choice of processing another ticket or quit.

Speeding
Fine: $5 per mile over speed limit  plus Court Fees

Speeding Highway Work Zone
Fine: $6 per mile over speed limit plus Court Fees

Speeding in a Residential District
Fine: $7 per mile over speed limit plus $200 plus Court Fees

Here is a typical session for this program:
Enter court fees: 62
Enter the type of speeding offense (1 for regular, 2 for highway, 3 for residential): 1
Enter the speed limit: 25
Enter the vehicle speed: 35
The total fine is $112

Enter 1 to enter another ticket or 0 to quit this fine calculator: 1

Enter the type of speeding offense (1 for regular, 2 for highway, 3 for residential): 3
Enter the speed limit: 55
Enter the vehicle speed: 65
The total fine is $332

Enter 1 to enter another ticket or 0 to quit this fine calculator: 0
Good bye.

The program needs to be structured using a class named FineCalculator that is in charge of computing the fine. The class declaration follows (no changes are allowed for this class definition):

class FineCalculator

{

public:

   FineCalculator(int courtFees);

   int getFine(int zone, int speedLimit, int actualSpeed) const;

private:

  int _courtFees;

};

The getFine member function must not do any input or output, the only thing it does is computing the fine corresponding to the different parameters.

For this project, the grading rubrics that apply are Design, Functionality, and Test. You can include the test data in a block comment in the cpp file containing your main, you your can just add a simple text file.

 

 

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational