Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ HELP! Create a class and name it Payslip. This class should have the following attributes or properties: name, pay grade, basic salary, overtime hours,

C++ HELP!

Create a class and name it Payslip. This class should have the following attributes or properties: name, pay grade, basic salary, overtime hours, overtime pay, gross pay, net pay and withholding tax. Define the accessors and mutators of the Payslip class based on its attributes or properties. This class should also have the following methods: determinePayGradeAndTaxRate and computePay. Create another class and name it Employee. This class will contain the main method. In the main method, instantiate an object of the Payslip class. Input the employee name, basic salary, and number of overtime (OT) hours. These values must be set to the object of the Payslip class.

Apply validations for input as follows:

a. Basic salary should not be less than 10,000.

b. Minimum overtime hours is 1 hour.

Basic Salary Details:

Pay Grade Tax Rate

A 10,000-15,000 10%

B 20,000 -25,000 15%

C 30,000-35,000 20%

D 40,000-45,000 25%

E 50,000 -55,000 30%

The computation is as follows: Gross pay = basic salary + OT pay OT pay = no. of OT hours * 1% of basic salary Net pay = gross pay withholding tax fixed values Withholding tax = gross pay * tax rate Note: Basic salary greater than or equal to 55,000 will have a pay grade of B and a tax rate of 30%.

The following are fixed values:

SSS = 500.00

Pag-ibig = 200.00

Philhealth = 100.00

Output should contain the following:

Employee Name :

Basic Salary :

Pay Grade :

No. of OT Hours :

OT Pay :

Gross Pay :

Withholding Tax :

Net Pay :

Note: Input of data and display of results should be defined on the main method. All monetary display should be formatted with comma separators, 2 decimal places, and Php (Ex: Php 32,546.95).

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Modeling And Design

Authors: Toby J. Teorey, Sam S. Lightstone, Tom Nadeau, H.V. Jagadish

5th Edition

0123820200, 978-0123820204

More Books

Students also viewed these Databases questions