469,955 Members | 1,442 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,955 developers. It's quick & easy.

Need a Program in OOP C++ using function over loading

Q.No.1: A company pays its employees on a weekly basis. The employees are of two types:
1. Salaried Employees 2. Hourly Employees
Salaried employees are paid with a fixed weekly salary, regardless of the number of hours they worked.
Fix week salary
is
2000 / w
Hourly employees are paid by the hour and receive overtime pay for all hours worked in excess of 40 hours. If they work less than 40 hours then their salary will be:
Salary = wage*hours
If they work more than 40 hours their salary will be calculated using the given formula:
Salary = (40*wage) +((hours-40)*wage*1.5)
Where wage per hour will be 400 PKR.
The company wants to implement a C++ program that performs its payroll calculations. You are required to write C++ program to implement the above mentioned concept using function overloading.
Sample output
Please enter employee status
Hourly Employee
Please enter work hours:
:
30
Your total salary is
12000
Following class diagram can help you to understand the class structure
Class Employee
Salaried Employees Hourly Employees Working Hours wage Salary
+Comput_salay()

It's Ugrent Please
4 Weeks Ago #1
1 7970
dev7060
535 Expert 512MB
Q.No.1: A company pays its employees on a weekly basis. The employees are of two types:
1. Salaried Employees 2. Hourly Employees
Salaried employees are paid with a fixed weekly salary, regardless of the number of hours they worked.
Fix week salary
is
2000 / w
Hourly employees are paid by the hour and receive overtime pay for all hours worked in excess of 40 hours. If they work less than 40 hours then their salary will be:
Salary = wage*hours
If they work more than 40 hours their salary will be calculated using the given formula:
Salary = (40*wage) +((hours-40)*wage*1.5)
Where wage per hour will be 400 PKR.
The company wants to implement a C++ program that performs its payroll calculations. You are required to write C++ program to implement the above mentioned concept using function overloading.
Sample output
Please enter employee status
Hourly Employee
Please enter work hours:
:
30
Your total salary is
12000
Following class diagram can help you to understand the class structure
Class Employee
Salaried Employees Hourly Employees Working Hours wage Salary
+Comput_salay()
You're going to need to write some code for this.
4 Weeks Ago #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Christopher M. Lusardi | last post: by
6 posts views Thread by hoover_richard | last post: by
21 posts views Thread by kimimaro | last post: by
19 posts views Thread by subramanian100in | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.