Java

Employee Allowance Tax Calculation using Java

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();
    }                                        

i have attached the video link below. which will do this tutorials step by step.

 

admin

Recent Posts

Employee Working Hours Calculation System using C#.net

Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…

1 week ago

Java Payroll System Calculate Employee Overtime

Act as a Java developer to create a program that calculates the gross wage for…

2 weeks ago

Employee Working Hours Calculation System using Java

Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…

2 weeks ago

Laravel 11 School Management System

In this tutorial, we will teach you how to create a simple school management system…

2 weeks ago

How to Make Admin Panel Using React MUI

I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…

4 weeks ago

Install Laravel Breeze for Authentication Using Laravel 11

In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…

1 month ago