Question: (C++ PROGRAM) A fifth-grade student wants to add three variable types. Given three integer numbers, she would like to know the sum of the three
(C++ PROGRAM)
A fifth-grade student wants to add three variable types. Given three integer numbers, she would like to know the sum of the three integers (which is an integer). Given three double numbers, she would like to know the sum of the three double numbers (which will be a double). And finally, given three string words/letters, she will like the three words to be appended together. Use your C++ programming skills to help this fifth grader to meet her needs as follows.
(a) Write a program that uses a function template called add to determine the sum of the integers and doubles, as well as the appended strings. Test the program in a separate file called Practice_2_Question_11.cpp using integer, floating-point number and string arguments. [Note that the function template and the test program are in two separate files]
(b) Inside the same Practice_2_Question_11.cpp from (a), address the fifth graders problem using function overloading technique.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
