Question: 17.5 Worksheet 5 Finish the methods in the following code. DO NOT CHANGE THE MAIN METHOD. The instructions for each method are in a comment

17.5 Worksheet 5

Finish the methods in the following code. DO NOT CHANGE THE MAIN METHOD. The instructions for each method are in a comment in the template. DO NOT CHANGE THE MAIN METHOD!!!!

#include  #include  using namespace std; // prototypes int main() { int answer = 0; int value1 = 0; int value2 = 0; double average = 0; string string1 = ""; int numberVowels = 0; int numberNonVowels = 0; cout << "Enter string1: "; getline(cin, string1); cout << "Enter value1: "; cin >> value1; cout << "Enter value2: "; cin >> value2; cout << endl; cout.setf(ios::fixed); cout.precision(2); answer = summationBetween(value1, value2); cout << "The summation is: " << answer << endl << endl; numberVowels = countVowelsAndOtherCharacters(string1, numberNonVowels); cout << "The string \"" << string1 << "\" has " << numberVowels << " vowels and "; cout << numberNonVowels << " characters that are not vowels. "; cout << endl; cout << endl; average = calculateAverage(); cout << endl; cout << "The average is: " << average << endl; return 0; } // Function: summationBetween // This function adds all the numbers between two numbers. It takes in two integers. // It adds the starting number and the ending number into the sum as well. // The total is returned. // Function: countVowelsAndOtherCharacters // This function counts the number of vowels and the number of nonvowels. It takes in a // string and an integer. It returns the number of vowels. // Function: calculateAverage // This function queries the user for values. It takes in no arguments. // It returns the average of the numbers. 

Sample output using VSCode. Part of the output comes from the main method.

Enter string1: Helloooo Nurse! Enter value1: 3 Enter value2: 5 The summation is: 12 The string "Helloooo Nurse!" has 7 vowels and 8 characters that are not vowels. Type -1 to exit. Enter a number: 2 Enter a number: 3 Enter a number: 10 Enter a number: 32 Enter a number: -1 The average is: 11.75 

Sample output for the same input as above using zyBooks. Part of the output comes from the main method.

Enter string1: Enter value1: Enter value2: The summation is: 12 The string "Helloooo Nurse!" has 7 vowels and 8 characters that are not vowels. Type -1 to exit. Enter a number: Enter a number: Enter a number: Enter a number: Enter a number: The average is: 11.75 

DO NOT CHANGE THE MAIN METHOD!!!!

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!