I want a program that - gives the user a description of what the program does for them - prompts the user to enter their name (and reads/stores it) - prompts the user to enter three bowling scores (and reads/stores them) - calculates their average for the three games - calculates their bowling handicap - displays a summary of the results I'll create a function for each of those six steps, though maybe the one for reading a score will just read and return one score so I'll call it three times. The main routine will need variables to store: - the name (maybe as a string?) - three scores (maybe as ints?) - the average (maybe a float?) - the handicap (another float?) If we go with that as a design then a first draft of the code might look like the program below. Remember that to write/compile/run our own programs from scratch (unlike the labs' makefiles) we use g++ ourselves, e.g. pluma bowling.cpp & g++ bowling.cpp -o bowlx ./bowlx // ------------------------------------------------------------------------------ // Starter program from the design above // ------------------------------------------------------------------------------ #include #include using std::cout; using std::cin; using std::endl; using std::string; // display the program intro/welcome message void welcome(); // get and return the bowler name string getName(); // get and return the score for a game, where the description parameter // contains a description like "first", "second", etc int getScore(string description); // given three game scores, calculate and return the average float calcAverage(int score1, int score2, int score3); // given the bowling average, calculate and return the handicap float calcHandi(float average); // given the handicap and average, display a summary of the results void displaySummary(float handi, float ave); int main() { // bowler's name (provided by user) string bowler; // game scores (provided by user) int game1, game2, game3; // calculated bowling average and handicap float average, handicap; // display the program instructions welcome(); // get the bowler's name and three game scores bowler = getName(); game1 = getScore("first"); game2 = getScore("second"); game3 = getScore("third"); // calculate and display the results average = calcAverage(game1, game2, game3); handicap = calcHandi(average); displaySummary(average, handicap); } // display the program intro/welcome message void welcome() { // t.b.d. } // get and return the bowler name string getName() { string bname = ""; // t.b.d. return bname; } // get and return the score for a game, where the description parameter // contains a description like "first", "second", etc int getScore(string description) { int score = 0; // t.b.d. return score; } // given three game scores, calculate and return the average float calcAverage(int score1, int score2, int score3) { float ave = 0; // t.b.d. return ave; } // given the bowling average, calculate and return the handicap float calcHandi(float average) { float handi = 0; // t.b.d. return handi; } // given the handicap and average, display a summary of the results void displaySummary(float handi, float ave) { // t.b.d. }