473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
Dec 26 '21 #1
1 9653
dev7060
636 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.
Dec 27 '21 #2

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

Similar topics

4
by: Christopher M. Lusardi | last post by:
Hello, Can I run the subject line program using CC instead of cc? I attempted to use the "-c" option and it told me things were undefined. Isn't this CC option the same as the cc -c option? ...
6
by: hoover_richard | last post by:
I am a newbie to C++ and I need help with a simple program I am trying to write. My program is designed to print all of the odd integers contained in an array and output the sum of the odd...
2
by: Jim | last post by:
I am a FoxPro programmer. What software do I need to program using MS access... I have apps that are non-web standalone and some web based... Do you recommend any learning resources? ...
21
by: kimimaro | last post by:
Is there anymore methods in exiting your program using pure C language other than return 0?
1
by: Netaro | last post by:
Well... So, i have a program. A normal program, which does something, and so.. and i have another program, which wants to run the first program.... So, there are 2 questions about that problem...
1
by: utpalagupta | last post by:
need to know the program for analysis of code complexity of any C program using java.
19
by: subramanian100in | last post by:
Stroustrup, in his book TC++PL 3rd Edition, in page 16, under the section '1.8 Advice' has mentioned the following: Don't use global data(use members) Don't use global functions Don't use...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.