Question: GRADING RUBRIC Indent code and insert comments to document your program. [10 pts] Program must be implemented and run as instructed to receive full credit.
GRADING RUBRIC
Indent code and insert comments to document your program. [10 pts]
Program must be implemented and run as instructed to receive full credit. [80 pts]
Programs that do not compile and run receive a 0 in credit. If you are having trouble getting your program to compile, comment out code until it compiles. This way, I can see what you were trying to accomplish and give partial credit.
Submit the C++ programs to Blackboard correctly. [10 pts]
The sports analyst needs to calculate the statistics for a quarterbacks passing. Write a C++ program Lab4 to calculate completion percentages based on the number of passing attempts and completions made. The statistics will also be based on the yardage. Your program should include the following functions -----
main ()
Declare all variables needed for the program.
Call all functions listed below and assign the returned values to the corresponding variables.
Display percentage of completions for 0-15 yards, percentage of completion for 16-25 yards, display percentage of completion for more than 25 yards. All percentages should display 2 decimal points.
getAttempts15 ( )
Value-returning function
Asks for the number of passing attempts (0-15 yards) and use a return statement to send it to main.
getCompletions15 ( )
Value-returning function
Asks for the number of completions made (0-15 yards) and use a return statement to send it to main.
getAttempts25 ( )
Value-returning function
Asks for the number of passing attempts (16-25 yards) and use a return statement to send it to main.
getCompletions25 ( )
Value-returning function
Asks for the number of completions made (16-25 yards) and use a return statement to send it to main.
getAttemptsMore25 ( )
Value-returning function
Asks for the number of passing attempts (more than 25 yards) and use a return statement to send it to main.
getCompletionsMore25 ( )
Value-returning function
Asks for the number of completions made (more than 25 yards) and use a return statement to send it to main.
calc15Percent (_______, ______)
Pass in values from getAttempts15 and getCompletions15
Value-returning function.
Calculates the the percentage completions (completions/attempts). Use a return statement to send it to main ().
calc25Percent (_______, ______)
Pass in values from getAttempts25 and getCompletions25
Value-returning function.
Calculates the the percentage completions (completions/attempts). Use a return statement to send it to main ().
calcMore25Percent (_______, ______)
Pass in values from getAttemptsMore25 and getCompletionsMore25
Value-returning function.
Calculates the the percentage completions (completions/attempts). Use a return statement to send it to main ().
NOTE:
Although the number of completions is an integer, the percentage should be double value. You need to convert either numerator or denominator to double type in the division calculation, for example ---
double percent = static_cast
The problem requires that you determine the parameters needed for each function.
The main () function should display ALL the statistics on the computer screen.
Code Sample output:

c Microsoft Visual Studio Debug Console Enter number of attempts from 8-15 yards: 2 Enter number of completions from 015 yards: 1 Enter number of attempts from 1625 yards: 8 Enter number of completions from 16-25 yards: 5 Enter number of attempts from more than 25 yards: 7 Enter number of completions from more than 25 yards: 5 Percentage of passing between 15 yards is 0.50 percentage of passing between 1625 yards is 0.62 Percentage of passing more than 25 yards is 6.71
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
