Question: here is the hint file please do this in C++ //if int number / 2 * 2 = origional number return true bool isEven(int); //if

here is the hint file please do this in C++

//if int number / 2 * 2 = origional number return true bool isEven(int); //if num1 > num2 and num1 > num3 then return num1 //if num2 > num1 and num2 > num3 then return num2 //else return num3 int largest(int, int, int); //same as largest //if str1 > str2 and str1 > str3 then return str1 //etc. string firstOf3Strings(string, string, string); //one big if/elseif/else statement //if numericGrade >= 93.0 then return "A" //else if numericGrade >= 90.0 then return "A-" //etc for 87.0 = B+, 83.0 = B, 80.0 = B-, 77.0 = C+, 70.0 = C, 60.0 = D, else = F string letterGrade(double); //if sales >= 3000 return commission(1500) + bonus(1300) + (.12 * (sales - 30000)) //if sales >= 20000 return commission + bonus(500) + (.08 * (sales - 20000)) //if sales >= 10000 return commission + (.05 * (sales - 10000)) //else return commission double salary(double); //one big if/elseif/else statement //if numeral == 'I' or 'i' return 1 //if numeral == 'V' or 'v' return 5 //if numeral == 'X' or 'x' return 10 //if numeral == 'L' or 'l' return 50 //if numeral == 'C' or 'c' return 100 //if numeral == 'D' or 'd' return 500 //if numeral == 'M' or 'm' return 1000 //else return -1 int romanNumeral(char); 

Write a program that will include the 6 functions outlined in textbook Ignore the output in the text book along with the example program included in the textbook files. Your program will result in the output shown below.

See the attached 7A_Hints file attached above for a list of functions and brief description of each function.

Create function definitions at the top of your program and the functions below your main method.

Next implement one function at a time. Compile your program and make sure the output matches what is requested. Then move to the next function.

Most functions require if statements. Many if statements can just return a value if true and therefore the rest of the function does not need to execute.

If you get the warning: "Not all control paths return a value." that means that you must use either a final else return value or simple return value at the end of your function as shown above.

Activity 7.1 Output:

Student Name, CIS127, Assignment 7.1 isEven(-2): 1 isEven(0): 1 isEven(2): 1 isEven(-1): 0 isEven(1): 0 largest(2, 4, 6): 6 largest(1, 2, 2): 2 largest(-5, -2, -7): -2 firstOf3Strings(c, b, a): a firstOf3Strings(B, B, a): B firstOf3Strings(ma, Ma, ma): Ma firstOf3Strings(x , x , x ): x letterGrade(94): A letterGrade(92): A- letterGrade(87): B+ letterGrade(86): B letterGrade(80): B- letterGrade(79): C+ letterGrade(76): C letterGrade(60): D letterGrade(58): F salary(1500): 1500 salary(10001): 1500.05 salary(20001): 2000.08 romanNumeral('i'): 1 romanNumeral('I'): 1 romanNumeral('v'): 5 romanNumeral('X'): 10 romanNumeral('L'): 50 romanNumeral('c'): 100 romanNumeral('D'): 500 romanNumeral('m'): 1000 Press any key to continue . . .

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!