Question: INTRODUCTION: Enhance Frisbee Golf Program to utilize static values and methods Handicaps are meant to level the playing field, by adjusting a players score based

INTRODUCTION: Enhance Frisbee Golf Program to utilize static values and methods Handicaps are meant to level the playing field, by adjusting a players score based on their average. This allows less capable Frisbee golf players in a league to be competitive against much better players. A quick example of how this works is: If your average is 72 and another player's average is 60 and you toss 68 times in a game and they toss a 60 you could actually win! To determine a players handicap in a face-off, take the average of the player with the higher average (the worse player) and subtract the lower players average. Take the result and multiply it by the leagues percentage factor (i.e. 80%, 90%, or 100%). The result is the number of tosses the worse player is being handicapped. Example using the players from above: Difference: 72 60 = 12 Percentage factor: 12 x 80% = 9.6 (which gets TRUNCATED to 9) Player 1 has a handicap of 9 tosses. If player 1 tosses a 68, their score would be decremented by 9 (adjusted score = 59). The adjusted score is used in determining who won the game. INCLUDE IN YOUR ASSIGNMENT At the top of each of your C++ programs, you should have at least four lines of documentation: Program name (the C++ file name(s)), Author (your name), Date last updated, and Purpose (a brief description of what the program accomplishes). Here is an example: // Program name: tictactoe.cpp // Author: Rainbow Dash // Date last updated: 5/26/2016 // Purpose: Play the game of Tic-Tac-Toe ASSIGNMENT: Programming Exercise The program needs to expand upon your Frisbee Golfer class. Create a static member variable to track the number of players in your league. Create a static method to display the current number of players in your league. Create a static variable for your leagues Percentage Factor. - Your league uses a percentage factor of 80% Create a static method getPercentageFactor() to return the leagues percentage factor. Create a method to determine the handicap of a golfer by passing in the other golfers average. IF the calculated handicap is less than zero, then the method should return zero (this would be the better player). Create two golfers. Display each players name, id, average, and handicap. Enter a score for each player. Determine the winner by applying the handicap. Update each players stats by adding their score (AFTER the winner has been determined/reported). Report the updated statistics for each player. Be sure to include in your program: An appropriate header comment, Validate scores to ensure there are no negative numbers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!