Mew2King
King of the Mews
I need a new C++ contact to help me with stuff. Does anyone want to volunteer XD?
this is current assignment. I'm just stupid.
Structured Programming & Design Assignment #6
For the upcoming season, Phillies management has decided to pay the players bonuses based on batting average AND fielding excellence. For non-baseball enthusiasts, batting average is the number of hits divided by total number of at-bats for a player (3 decimals normally are shown). Fielding is based on the number of errors committed.
//battingAverage = numOfHits / totalNumOfAtbats?
The following chart shows the bonus amount for batting average:
Less than .300 $0
.300 - .325 $50,000
.326 - .350 $100,000
Over .350 $150,000
The following chart shows the bonus amount for fielding excellence:
< 20 errors $10,000
20 - 30 errors $5,000
Over 30 errors $0
The program must contain the following:
1. A separate function must handle EACH type of bonus.
//function for fieldingBonusMoney();
//function for battingBonusMoney();
2. Input will require the player’s name, number of errors, number of hits, and number of at-bats.
//cout << “input player’s name: ”;
//cin >> playerName;
//cout << “input number of errors: ”;
//cin >> numOfErrors;
//cout << “input number of hits: “;
//cin >> numOfHits;
//cout << “input number OfAtBats: “;
//cin >> numOfAtBats;
3. You should have 2 output report sections:
- one showing fielding bonus $$
- one showing batting bonus $$
o //Output is at the very bottom and is easy
4. You should also display the total bonus received for both.
5. Be sure to provide a ‘readable’ output report. You design the output report.
6. This program should handle any number of Phillies players.
this is current assignment. I'm just stupid.
Structured Programming & Design Assignment #6
For the upcoming season, Phillies management has decided to pay the players bonuses based on batting average AND fielding excellence. For non-baseball enthusiasts, batting average is the number of hits divided by total number of at-bats for a player (3 decimals normally are shown). Fielding is based on the number of errors committed.
//battingAverage = numOfHits / totalNumOfAtbats?
The following chart shows the bonus amount for batting average:
Less than .300 $0
.300 - .325 $50,000
.326 - .350 $100,000
Over .350 $150,000
The following chart shows the bonus amount for fielding excellence:
< 20 errors $10,000
20 - 30 errors $5,000
Over 30 errors $0
The program must contain the following:
1. A separate function must handle EACH type of bonus.
//function for fieldingBonusMoney();
//function for battingBonusMoney();
2. Input will require the player’s name, number of errors, number of hits, and number of at-bats.
//cout << “input player’s name: ”;
//cin >> playerName;
//cout << “input number of errors: ”;
//cin >> numOfErrors;
//cout << “input number of hits: “;
//cin >> numOfHits;
//cout << “input number OfAtBats: “;
//cin >> numOfAtBats;
3. You should have 2 output report sections:
- one showing fielding bonus $$
- one showing batting bonus $$
o //Output is at the very bottom and is easy
4. You should also display the total bonus received for both.
5. Be sure to provide a ‘readable’ output report. You design the output report.
6. This program should handle any number of Phillies players.