Question: c++ 2nd one 1. Swapping Two Numbers In spFunctions ILswap. cpp, write an overloaded function, swap, that will accept two parameters via pass-by- reference and

c++ 2nd one
1. Swapping Two Numbers In spFunctions ILswap. cpp, write an overloaded function, swap, that will accept two parameters via pass-by- reference and swap the values stored in the two parameters. One function should accept and swap two integers while another function should accept and swap two doubles. Include driver code in function main that will test each of these functions Driver code is simply code that is used to test a function to verify it works. It is generally best to hard-code values rather than getting them from outside the program as testing code is generally something for a programmer's eyes only. 2. Triangle Area In spFunctions ILarea. cpp, write a function, calculateTriangleArea, which will accept three parameters, the lengths of the sides of a triangle, via pass-by-value and one pass-by-reference parameter which will store the area of the triangle if possible. The function should determine if the lengths of the sides of the triangle form a triangle before attempting to calculate its area. If the lengths sent to the function form a triangle and the area is calculated successfully the function should return true to indicate this success; otherwise, the function should return false to indicate that the area was not calculated. Include driver code in function main to thoroughly test this function
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
