Week7 MachineProblem2 09072021A
Week7 MachineProblem2 09072021A
Machine Problem 2
Objective/s:
At the end of this activity, you should be able to:
define a class
instantiate objects of the class
invoke the methods of the class
implement the required output
compute the net income
Procedure:
Create a NetBeans project for this activity.
Project Name: MP2_<lastname_firstname>
Example: MP2_Blanco_Maria
Define 2 classes. The main class contains the main method.
Main Class: Employee_<lastname>
Example: Employee_Blanco
1. Define the attributes of the PaySlip class. Define the constructor for this class.
2. Define the setters (mutators) and the getters (accessors) for the PaySlip class.
3. Define also the custom methods in the PaySlip class as follows but not limited
to determineWithholdingTax( ) and computeCompensation( ).
4. Input the employee name, basic salary, and number of overtime (OT) hours.
Data input should be done in the main method. The final output as described in
#9 should be generated in the main method, as well.
Assessments
31,000 61,000 2,300 + 25% of the excess over 31,000
61,000 154,000 10,000 + 30% of the excess over 61,000
154,000 615,000 38,000 + 32% of the excess over 154,000
615,000 185,000 + 35% of the excess over 615,000
8. Use the Philippine Peso currency and 2 decimal places for all the monetary
value display.