Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*** The driver (main) is complete - complete the function definitions below. Please use C++ language. *** #include using namespace std; const in SCREENWIDTH =
*** The driver (main) is complete - complete the function definitions below. Please use C++ language. *** #include using namespace std; const in SCREENWIDTH = 80; void drawLine(char lineSymbol); char displayMenu(); double getSpeedKPH(); void getPace(int& minutes, int& seconds); double convertToMPH(const int minutes, const int seconds); double convertToMPH(const double speedKPH); int main() { char selection = '?'; int minutes = 0; int seconds = 0' double speed = 0; do { selection = displayMenu(); switch (selection) { case 'P' : getPace(minutes, seconds); speed = convertToMPH(minutes, seconds); cout << "Your speed is " << speed << " MPH" << endl; break; case 'S' : speed = getSpeedKPH(); speed = convertToMPH(speed); cout << "Your speed is " << speed << " MPH" << endl; break; case 'X' : break; default : cout << "Invalid choice, please try again" << endl; } } while (selection != 'X'); return 0; } // draw a line on the screen using the lineSymbol of length LINEWIDTH void drawLine(char lineSymbol) { } // screen menu with options for Pace, Speed, eXit char displayMenu() { } // get user input for a speed in KPH double getSpeedKPH() { } // get user input for the minutes and seconds to travel 1 mile void getPace(int& minutes, int& seconds) { } // convert the walking pace in mnutes and seconds to MPH double convertToMPH(const int minutes, const int seconds) { } // convert the speed in KPH to MPH double convertToMPH(const double speedKPH) { }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started