Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi There Guru's, I need assistance with my C++. Thank you in Advance. The problem states that 2 SEPARATE CLASSES are to be made and

Hi There Guru's, I need assistance with my C++. Thank you in Advance.

The problem states that 2 SEPARATE CLASSES are to be made and All monetary display should be formatted with comma separators, 2 decimal places, ex: Php (Ex: Php 32,546.95).

1. 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.

2. 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.

3. Create another class and name it Employee. This class will contain the main method.

4. 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.

5. Basic Salary Details:

Pay Grade A Pay Grade B Tax Rate

10,000 15,000 10%

20,000 25,000 15%

30,000 35,000 20%

40,000 45,000 25%

50,000 55,000 30%

6. 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%.

7. The following are fixed values: SSS = 500.00 Pag-ibig = 200.00 Philhealth = 100.00

8. 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).

-------------> The following are fixed values: SSS = 500.00 Pag-ibig = 200.00 Philhealth = 100.00

--------------> Pay Grades:

Pay Grade A Pay Grade B Tax Rate
10,000 15,000 10%
20,000 25,000 15%
30,000 35,000 20%
40,000 45,000 25%
50,000 55,000 30%

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

More Books

Students also viewed these Databases questions

Question

Describe the nature of negative messages.

Answered: 1 week ago