Hit The Order Button To Order A **Custom Paper**

>> CLICK HERE TO ORDER 100% ORIGINAL PAPERS FROM AustralianExpertWriters.com <<

5 Sep
2019

Design a football program | Good Grade Guarantee!

Ok I designed a football program and there are 3 things wrong with the code. The program compiles and runs but these are the additions I need to make1. the penalties are not quite right. A 1st down could happen for a 4th down penalty on the first one you look to see if the down >4 first then look at the yards bythen it is too late2. The extra points are not to default to 0if they are invalid it should keep asking until they enter a valid value3. The program does not repeat fully if the user selects to run it again.
Heres the code:#include#include
using namespace std;
int main() {bool anotherGame = true, gameIsOver = false;bool homeHasBall;string home, visitor, qrtrStr, hasBallStr;char receiving, choice;int quarter, homeScore, visitorScore, down, yardsTo1stDown;
coutwhile(anotherGame == true) {coutcin >> home;coutcin >> visitor;coutcin >> receiving;coutif (tolower(receiving) == ‘h’)homeHasBall = true;elsehomeHasBall = false;
coutcoutcoutcoutcout
quarter = 1;homeScore = 0;visitorScore = 0;yardsTo1stDown = 10;down = 1;while (gameIsOver == false) {if (quarter == 1)qrtrStr = “1st”;else if (quarter == 2)qrtrStr = “2nd”;else if (quarter == 3)qrtrStr = “3rd”;elseqrtrStr = “4th”;if (homeHasBall == true)hasBallStr = “H [” + home + “]”;elsehasBallStr = “V [” + visitor + “]”;coutcoutcoutcin >> choice;
choice = tolower(choice);
if (choice == ‘y’) {int yards;coutcin >> yards;yardsTo1stDown -= yards;if (yardsTo1stDownyardsTo1stDown = 10;down = 1;} else {down++;}if (down > 4) {yardsTo1stDown = 10;down = 1;homeHasBall = !homeHasBall;}} else if (choice == ‘f’) {if (homeHasBall)homeScore += 3;elsevisitorScore += 3;homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else if (choice == ‘g’) {int extra;coutcin >> extra;if (extra > 2 || extracoutextra = 0;}if (homeHasBall)homeScore += 6 + extra;elsevisitorScore += 6 + extra;homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else if (choice == ‘s’) {if (homeHasBall)visitorScore += 2;elsehomeScore += 2;homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else if (choice == ‘t’) {homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else if (choice == ‘q’) {quarter++;if (quarter > 4)gameIsOver = true;else if (quarter == 3) {cout if (tolower(receiving) == ‘h’)homeHasBall = false;elsehomeHasBall = true;yardsTo1stDown = 10;down = 1;}} else if (choice == ‘p’) {char team, repeat;int penalty;coutcin >> team;coutcin >> repeat;coutcin >> penalty;if (homeHasBall == true) {if (tolower(team) == ‘h’) {if (tolower(repeat) == ‘n’) {down++;}if (down > 4) {homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else {yardsTo1stDown += penalty;}} else {if (tolower(repeat) == ‘n’) {down++;}yardsTo1stDown -= penalty;if (yardsTo1stDownyardsTo1stDown = 10;down = 1;} else if (down > 4) {homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;}}} else {if (tolower(team) == ‘v’) {if (tolower(repeat) == ‘n’) {down++;}if (down > 4) {homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;} else {yardsTo1stDown += penalty;}} else {if (tolower(repeat) == ‘n’) {down++;}yardsTo1stDown -= penalty;if (yardsTo1stDownyardsTo1stDown = 10;down = 1;} else if (down > 4) {homeHasBall = !homeHasBall;yardsTo1stDown = 10;down = 1;}}}} else if (choice == ‘c’) {return 1;} else {cout}}cout coutcin >> choice;if (tolower(choice) == ‘n’)anotherGame = false;gameIsOver = true;}return 0;}
Its being complied and run in DevC++

QUALITY: 100% ORIGINAL – NO PLAGIARISM.

  • **REMEMBER TO PRECISE PAGE NUMBER**
  • Hit The Order Button To Order A **Custom Paper**

>> 100% ORIGINAL PAPERS FROM AustralianExpertWriters.com <<