0% found this document useful (0 votes)
16 views

Code

This Java program calculates an employee's monthly pay slip by deducting taxes, social security contributions, medicare, and pagibig contributions from their gross pay and printing the employee name, gross pay, deductions, and net pay.
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Code

This Java program calculates an employee's monthly pay slip by deducting taxes, social security contributions, medicare, and pagibig contributions from their gross pay and printing the employee name, gross pay, deductions, and net pay.
Copyright
© © All Rights Reserved
Available Formats
Download as ODT, PDF, TXT or read online on Scribd
You are on page 1/ 1

public class EmployeeMonthlyPaySlip

{
public static void main(String[] args)
{
double withholdingtax = .15;
double ssscontribute = .0363;
double medicare = .0125;
double pagibig = 100.00;

String employeename = "Jess Diaz";


double grosspay = 25000.0;

System.out.println ("Employee Name: " + employeename);


System.out.println ("Gross Pay: " + grosspay);
System.out.println ("________________________________");
System.out.println ("Deductions Amount");

double tax = grosspay * withholdingtax;


System.out.println ("Withholding Tax: " + tax);

double contribute = grosspay * ssscontribute;


System.out.println ("SSS Contribution: " + contribute);

double medicares = grosspay * medicare;


System.out.println ("Medicare: " + medicares);

System.out.println ("Pagibig Contribution: " + pagibig);

System.out.println ("________________________________");
double totalDeductions = tax + contribute + medicares + pagibig;
double netpay = grosspay - totalDeductions;
System.out.println ("Net Pay: " + netpay);
}

You might also like