Question: Some hints: If you need to return several values then arrays can be an option. Since we do not know the number of students and

 Some hints: If you need to return several values then arrays

can be an option. Since we do not know the number of

Some hints: If you need to return several values then arrays can be an option. Since we do not know the number of students and number of grades limit them to a maximum of students and to a maximum of grades. Ex: maximum students 3, maximum grades 4. For testing work with small values. If we change the values, later, it will not affect the logic of the solution. One possibility is to create the array(s) before you call the function and pass the array(s) as argument(s) to the functio

For this lab refer to Program 5-14 page 267-268 of your textbook. You must implement the same program using functions. The functions will need some inputs and return the average score. The average score is displayed after the return of the function. All 4 functions do the same but implement its task using different loops. Function name and definitions must be as follows: . F1 uses only While loops. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 20points. F2 uses only do-while loops. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 30points. F3 uses only while (Exterior loop), For (interior or inner loop). Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 25 points. F4 uses only For (Exterior Loop) and while for interior loop. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 20points. Note: You may create only one program with the four functions but for every test of your program you comment three and work with one. Example: main.cpp ****** main.cpp 1. /*** 2 When testing for function one F1 3 ********* 4 #include 5 using namespace std; 6 // This is just to show you the logic. 7 float fi(list of parameters); 8 float f2(); 9 float f3(); 10 float f(); 11 int main() 12-{ 13 Enter some data previous to calling fx. where x = 1, 2, 3, 4. 14 1/When testing fi. 15 float averageScore; 16 f1(); 17 Display averageScore returned by f1. 18 // The others are commented while testing fx. 19 // f2(); 20 // f3(); 21 // f4(); 22 return; 23 } 24 // function definitions follows 25 - float f1(list of parameters) { 26 body of the function f1 using only while loop. 27 return averageScore; 28 } 29 Repeat for testing fx. For this lab refer to Program 5-14 page 267-268 of your textbook. You must implement the same program using functions. The functions will need some inputs and return the average score. The average score is displayed after the return of the function. All 4 functions do the same but implement its task using different loops. Function name and definitions must be as follows: . F1 uses only While loops. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 20points. F2 uses only do-while loops. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 30points. F3 uses only while (Exterior loop), For (interior or inner loop). Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 25 points. F4 uses only For (Exterior Loop) and while for interior loop. Test your program with the data input given and displays the outputs. Submit txt file with your c++ code. 20points. Note: You may create only one program with the four functions but for every test of your program you comment three and work with one. Example: main.cpp ****** main.cpp 1. /*** 2 When testing for function one F1 3 ********* 4 #include 5 using namespace std; 6 // This is just to show you the logic. 7 float fi(list of parameters); 8 float f2(); 9 float f3(); 10 float f(); 11 int main() 12-{ 13 Enter some data previous to calling fx. where x = 1, 2, 3, 4. 14 1/When testing fi. 15 float averageScore; 16 f1(); 17 Display averageScore returned by f1. 18 // The others are commented while testing fx. 19 // f2(); 20 // f3(); 21 // f4(); 22 return; 23 } 24 // function definitions follows 25 - float f1(list of parameters) { 26 body of the function f1 using only while loop. 27 return averageScore; 28 } 29 Repeat for testing fx

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!