1. Engineering
2. Computer Science
3. this is an example of overloading functions two functions are...

# Question: this is an example of overloading functions two functions are...

###### Question details

This is an example of overloading functions. Two functions are overloaded if the functions share a name but have different parameter lists.

Each of the functions will accept from one to four parameters (floats) and calculate a gross pay. The gross pay is returned to the calling function

1. float calcGrossPay(float salary)

return salary

1. float calcGrossPay(float hours, float rate)

return hours * rate

1. float calcGrossPay(float salary, float ot-hours, float ot-rate)

return salary + ot-hours * ot-rate

1. float calcGrossPay(float hours, float rate, float ot-hours, float ot-rate)

return hours * rate + ot-hours * ot-rate

in main ask the user for

1. salary
2. hours
3. pay rate
4. over time hours
5. overtime rate

call each of the overloaded functions with the proper arguments

output (these are the numbers you read in)

salary                   ??,???.00

hours                           ??.00

pay rate                     ???.00

over time hours          ??.00

overtime rate            ???.00

salary                   ??,???.00                            // from function ‘A’

hourly pay                  ??.00                              // from function ‘B’

salary + o/t           ??,???.00                              // from function ‘C’

hourly pay + o/t   ??,???.00                              // from function ‘D’

Use the output (cout) manipulators to format the output correctly [setw(?), fixed, right, left, etc]