Write a program that will calculate the salary for employees at the High Fashion retail store. The
program must use two overloaded functions, each named " calcSalary". The first function must
calculate the salary for a permanent employee. It will have one parameter of type "char"
representing the type of duties that the employee performs. The second function will calculate the
salary for a temporary employee. It will have a parameter of type "char" representing the duties of a
temporary worker and a second parameter of type "int" representing the number of hours that the
employee works per month.
The main function should request the user to specify whether the worker is a permanent
employee (represented by the character ‘p’) or temporary employee (represented by the
character ‘t’). The user should then be asked to enter the type of duties performed by the
employee. The possible duties for permanent employees are sales, represented by the character
‘s’ or stock control, represented by the character ‘c’. The possible duties for temporary
employees are merchandising, represented by the character ‘m’ or stock counting, represented
by the character ‘c’. If the employee is temporary, the user must be asked to input the number
of hours that the employee works per month as well. Temporary employees either work 60 hours
or 102 hours per month. The main function should then call the correct overloaded function and display the salary.
Define four double constant variables: "PERM_PER_HOUR_SALES" with a value of " 30.70",
"PERM_PER_HOUR_STOCK" with a value of "28.50", "TEMP_PER_HOUR_MERCH" with a value of "17.90" and "TEMP_PER_HOUR_COUNT" with a value of "16.80", representing the rate per hour to
be used in the calculation of the salary for permanent and temporary employees respectively
according to their duties. Also define an "int" constant variable "PERM_HOURS" with a value of 192
representing the number of hours that a permanent employee works per month.
Comments
Dear Kiran You're welcome. We are glad to be helpful. If you really liked our service please press like-button beside answer field. Thank you!
Thank you so much....this is such a gr8 site...keep up the amazing wrk...
Leave a comment