Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SIDE NOTE: PLEASE USE C++ Programming Exercise #3-User Defined Functions (8 pts The Quebec government is trying to crack down on texting and driving. The
SIDE NOTE: PLEASE USE C++
Programming Exercise #3-User Defined Functions (8 pts The Quebec government is trying to crack down on texting and driving. "The law is very clear: you must not hold a cell phone in your hand while driving. Failure to abide by this rule is an offence subject to a fine and demerit points." Pines Haney sore inFornation beFore te11 you uhat the Fine and denerit pointo are. ere Are the possihle lacat ions Drivev uat tapped ?n the highway Ca,aischtepp"anat a Step tig" ar traffie light a program that determines the penalty for a driver holding a cell phone while driving based on Nancy's Crazy criteria. lease enter the digit If the driver is driving and holding a cell phone question officer! Bov nany dewerit po into did the driver have prior to being On the highway the fine is $80. If it is the drivers 1t offence s/he gets 1 demerit point otherwise E- ie a tichet For 588 and infora tlh driver that thy now have donerit points, 2 demerit points. 5ab afficert Czy Nancy' telt you to keep up the good work In a school zone the fine is $100(the maximum). If the driver has been driving for less than 24 months s/he lkoose his/her license on the spot otherwise s/he get 4 demerit points (the maximum). the car is stopped such as at a stop sign or a traffic light and the cellphone is an iPhone, the fine is $100 and s/he gets 2 demerit point otherwise the fine is $8D and s/he gets 1 demerit points. (Crazy Nancy does not like iPhones.) Vo lcone .All other cases the fine is $90 and the driver gets 3 demerit points. leore Offeer- need sene infornation before I tell you vhat the fine nd denerit pointe are Driver a stopped on the highway After determining where the driver was stopped and their fine, if they have not yet lost their license, the officer how many demerit points the driver originally had. When a driver has 12 demerit points th lose their license. Determine if the driver should lose their license given where they were when holdir Cav ?.stopped at a Stap tign tNffde light leace onter the digit cerresponding te your Gase 2 Eicer. hou oany nonths hao Ehe driver been driving their cell phone. Output how many demerit points the driver now has. Make sure the officer enters 1 to 4 for the choice of location. Your program must have at least the following functions: OEfseer. write a tieket or $100 tahe ay their driver' 1ieense and nake arrangenente to have the car toved right auay od job officer Crazy Nancy tells you to keep s the d rk Figure 9- in a school zone displayHeader: this function is a void function and has no parameters. It simply displays the welcome banner on the screen. menuAndChoice:this is an integer function with no parameters; it displays the menu and returns the officer's input as to where the driver was stopped .finesDemerits: this function is a void method with a value parameter for the location of the f Veloone ll TCv onooi Crile (value returned by the menuAndChoice( function) and two reference parameters; it calculate the drivers fines and demerit points showFinesDemerits: this void function has two value parameters. It displays the fine, the demerit points and whether the driver has lost hisher driver's license. need ???? infarnation before I tell you what the fine and denerit paintz arg . Driver stopped an the highway Car it-stopped at 8sop ?ga er traffic light Here are a few sample outputs to illustrate the expected behavior of your program. Note: user input is highlighted with a circle question officer! llob. Mny dencrit pointa did the drivcr havc prior to bein? atapped?'9 -> write a eicket fo $88 ??sd inforn ehe driver that they now have 1? donerie points. od Job officert CraRy Haney"s tells you te keey up the good work Programming Exercise #3-User Defined Functions (8 pts The Quebec government is trying to crack down on texting and driving. "The law is very clear: you must not hold a cell phone in your hand while driving. Failure to abide by this rule is an offence subject to a fine and demerit points." Pines Haney sore inFornation beFore te11 you uhat the Fine and denerit pointo are. ere Are the possihle lacat ions Drivev uat tapped ?n the highway Ca,aischtepp"anat a Step tig" ar traffie light a program that determines the penalty for a driver holding a cell phone while driving based on Nancy's Crazy criteria. lease enter the digit If the driver is driving and holding a cell phone question officer! Bov nany dewerit po into did the driver have prior to being On the highway the fine is $80. If it is the drivers 1t offence s/he gets 1 demerit point otherwise E- ie a tichet For 588 and infora tlh driver that thy now have donerit points, 2 demerit points. 5ab afficert Czy Nancy' telt you to keep up the good work In a school zone the fine is $100(the maximum). If the driver has been driving for less than 24 months s/he lkoose his/her license on the spot otherwise s/he get 4 demerit points (the maximum). the car is stopped such as at a stop sign or a traffic light and the cellphone is an iPhone, the fine is $100 and s/he gets 2 demerit point otherwise the fine is $8D and s/he gets 1 demerit points. (Crazy Nancy does not like iPhones.) Vo lcone .All other cases the fine is $90 and the driver gets 3 demerit points. leore Offeer- need sene infornation before I tell you vhat the fine nd denerit pointe are Driver a stopped on the highway After determining where the driver was stopped and their fine, if they have not yet lost their license, the officer how many demerit points the driver originally had. When a driver has 12 demerit points th lose their license. Determine if the driver should lose their license given where they were when holdir Cav ?.stopped at a Stap tign tNffde light leace onter the digit cerresponding te your Gase 2 Eicer. hou oany nonths hao Ehe driver been driving their cell phone. Output how many demerit points the driver now has. Make sure the officer enters 1 to 4 for the choice of location. Your program must have at least the following functions: OEfseer. write a tieket or $100 tahe ay their driver' 1ieense and nake arrangenente to have the car toved right auay od job officer Crazy Nancy tells you to keep s the d rk Figure 9- in a school zone displayHeader: this function is a void function and has no parameters. It simply displays the welcome banner on the screen. menuAndChoice:this is an integer function with no parameters; it displays the menu and returns the officer's input as to where the driver was stopped .finesDemerits: this function is a void method with a value parameter for the location of the f Veloone ll TCv onooi Crile (value returned by the menuAndChoice( function) and two reference parameters; it calculate the drivers fines and demerit points showFinesDemerits: this void function has two value parameters. It displays the fine, the demerit points and whether the driver has lost hisher driver's license. need ???? infarnation before I tell you what the fine and denerit paintz arg . Driver stopped an the highway Car it-stopped at 8sop ?ga er traffic light Here are a few sample outputs to illustrate the expected behavior of your program. Note: user input is highlighted with a circle question officer! llob. Mny dencrit pointa did the drivcr havc prior to bein? atapped?'9 -> write a eicket fo $88 ??sd inforn ehe driver that they now have 1? donerie points. od Job officert CraRy Haney"s tells you te keey up the good workStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started