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

Java Program Employee - Management Program

This Java program calculates employee payroll information. It takes employee name and basic salary as input. It then calculates medical, home rent and travel allowances as 10% each of basic salary. Gross salary is calculated as basic salary plus total allowances. 10% of gross salary is deducted as pension fund and net salary is calculated as gross salary minus deductions. The employee name and net salary are then displayed as output.

Uploaded by

Sathish Sät Sk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Java Program Employee - Management Program

This Java program calculates employee payroll information. It takes employee name and basic salary as input. It then calculates medical, home rent and travel allowances as 10% each of basic salary. Gross salary is calculated as basic salary plus total allowances. 10% of gross salary is deducted as pension fund and net salary is calculated as gross salary minus deductions. The employee name and net salary are then displayed as output.

Uploaded by

Sathish Sät Sk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

//​JAVA PROGRAM EMPLOYEE_MANAGEMENT PROGRAM

import java.util.*; //scanner


import java.io.*; //println

class employee
{
int basic_saly, medicial_allw,homerentallw, travel_allw,allowance;
int basic_sal,gross_salary,pension_fund, Deduction,net_salary;
String name;

void input()
{
Scanner in=new Scanner(System.in);
System.out.println("enter your name");
name=in.nextLine();
System.out.println("enter ur basic salary");
basic_sal=in. nextInt();
}

void calculate()
{
medicial_allw=(basic_saly*10)/100;
homerentallw=(basic_saly*10)/100;
travel_allw=(basic_saly*10)/100;

allowance=medicial_allw+homerentallw+travel_allw;
gross_salary=basic_sal+allowance;

pension_fund=(gross_salary*10)/100;
Deduction =pension_fund ;

net_salary=gross_salary-Deduction;
}

void display()
{
System.out.println("your NAME :"+name);
System.out.println("your NET_SALARY :"+net_salary);
}
}

class employee_management
{
public static void main(String args[])
{
employee e1=new employee();
e1.input();
e1.calculate();
e1.display();
}
}
OUTPUT:
F:\java file>javac employeemanagement.java
F:\java file>java employee_management
enter your name
SATHISH KUMAR
enter ur basic salary
50000
your NAME :SATHISH KUMAR
your NET_SALARY :45000

You might also like