Exclude any source code files that may already be in your IDE project and add three new ones, naming them C1A5E2_Compute
Posted: Fri May 20, 2022 10:46 am
Exclude any source code files that may already be in your IDE project and add three new ones, naming them C1A5E2_Compute Minimum.cpp, C1A5E2_ComputeMaximum.cpp, and C1A5E2_main.cpp. Do not use #include to include any of these three files in each other or in any other file. However, you may use it to include any appropriate header file(s) you need. a File C1A5E2_Compute Minimum.cpp must contain function named ComputeMinimum and C1A5E2_ComputeMaximum.cpp must contain a function named ComputeMaximum. Each function must: 1. Have exactly two formal parameters, each of type "reference to const double". 2. Be declared to return type "reference to double" (not "reference to const double"). 3. Contain only one statement. 4. Not use variables other than its formal parameters. 5. Not use anything that requires #define or #include. 6. Not use literal values. 7. Not do assignment, addition, subtraction, multiplication, or division. 8. Not use if, switch, or looping statements. 9. Not call functions or macros. 10. Not display anything. ComputeMinimum must compare the values referenced by its parameters and return a reference to the smallest value or, if equal, to eith ComputeMaximum must do the same for the greatest value. File C1A5E2_main.cpp must contain function main, which must: 1. Use no more than two variables. 2. Use no casts. 3. Prompt the user to enter two space-separated decimal values on the same line. 4. Pass references to the user-entered values to both ComputeMinimum and ComputeMaximum as arguments. 5. Display the results of both function calls using the following 2-line format, where the question marks represent the values whose references are passed to and returned from the functions: ComputeMinimum(?, ?) returned ? ComputeMaximum(?, ?) returned ? For example, if the user enters -5.8 5.8 the result should be: ComputeMinimum(-5.8, 5.8) returned -5.8 ComputeMaximum(-5.8, 5.8) returned 5.8 • Do not treat equal values as a special case. • Scientific and standard notation are both okay and may be mixed. • Zeros that don't affect a fractional part's value may be omitted. • If a fractional part is empty the decimal point may be omitted. Manually re-run your program several times, testing with at least the following 5 sets of user input values, where each set represents the argument values in left-to-right order: 6.9 6.4 6.4 6.9 -5.8 5.8 -0.0 0.0 8.4e3 6.2e-1