Home Java Employee Allowance Tax Calculation using Java

Employee Allowance Tax Calculation using Java

0
286

In this tutorials will  teach you how to make a Employee Allowance Tax Calculation using Java step by step. Those who wants to learn payroll system this is the right place.

Lets do the Project

Lets Create the three different Functions  and do the Calculation

when you calculate the Employee Salary there should be the Condition

if the Basic Salary > 50000/= include Tax 0.1 allowance 0.15

if the Basic Salary > 30000/= include Tax 0.05 allowance 0.1

if the Basic Salary > 15000/= include Tax 0.0 allowance 0.05

``` public void SalaryCall()
{
double bsal,tax,allo,nsal;
bsal = Double.valueOf(txtbsal.getText()).doubleValue();

if(bsal > 50000)
{
tax = bsal * 0.1;
allo =  bsal * 0.15;
}
else if(bsal > 30000)
{
tax = bsal * 0.05;
allo =  bsal * 0.1;
}
else if(bsal > 15000)
{
tax = 0.0;
allo =  bsal * 0.5;
}
else
{
tax = 0.0;
allo =  0.0;
}
nsal = bsal + allo - tax;

txttax.setText(String.valueOf(tax));
txtallow.setText(String.valueOf(allo));
txttotal.setText(String.valueOf(nsal));

}

public void Clear()
{
txtbsal.setText("");
txttax.setText("");
txtallow.setText("");
txttotal.setText("");
txtbsal.requestFocus();

}
public void Exit()
{
System.exit(0);
}```

After that call the Function inside the button

```    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

SalaryCall();
}

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

System.exit(0);
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

Clear();
}
```

• Building an Inventory System using Java

Introduction An inventory management system is an imponent aspect for  businesses han…
• Sales Profit Margin Calculation Java Mysql

This tutorial will teach you how to make a Inventory Management System in Java mysql step …
• Payroll Loan Calculation using Java

in this tutorial will help you to learn Payroll Loan Calculation using Java. how to change…
• Library Management System using Spring Boot

This tutorils will teach about complete library management project.the purpose of this pro…
• Complete Spring Boot RESTful API CRUD Project Tutorial

Introduction to Spring Boot and RESTful APIs Spring Boot is a powerful framework for build…
• Student Management System using Spring Boot

This tutorils will teach about complete student management project.the purpose of this pro…
• Electricity Bill Calculation using Java Application

This tutorils teach Electricity Bill Calculating based on the below conditions step by ste…
• Banking Loan Calculation Project using Java

This tutorials series we are going to talk about how to make a banking loan calculation pr…
• Bakery Management System Project using Java

This tutorial will teach you how to make a Bakery Management System Project using Java in …