Words of Wisdom:

"The IRS employees tax manual has instructions for collecting taxes after a nuclear war." - Jeffryma

Java Codes

  • Date Submitted: 03/16/2013 07:37 PM
  • Flesch-Kincaid Score: 84.3 
  • Words: 262
  • Essay Grade: no grades
  • Report this Essay
Description:  
This program is to compute the salary of an employee, first, you will input the Employee name or your name, then input the hours of work not less than 12, because if it’s less than 12, the output will be invalid. Then it includes the rate of pay that will multiply to the hours of work and deduct the salary Tax.

Program:
import java.io.*;
public class JavaApplication6 {
public static void main(String[] args) throws IOException{
  BufferedReader num= new BufferedReader(new InputStreamReader(System.in));
  System.out.print("Enter Name: ");
    String Name = num.readLine();
    System.out.print("No. of hours worked: ");
    int HoursOfWork= Integer.parseInt(num.readLine());
    if(HoursOfWork==12){
    double rate = 200.50;
    double net = rate*12;
    double tax= net*.12;
    double tded = tax;
    double netpay = net-tded;
        System.out.println("Employee name: "+Name);
        System.out.println("No of hours work: "+HoursOfWork);
        System.out.println("Net Income: "+net);
     
       
        System.out.println("tax: "+tax);
            System.out.println("Total Deduction: "+tded);
            System.out.println("Net Pay: "+netpay);

    }
else if(HoursOfWork > 12) {
        double hours = HoursOfWork - 12;
        double otfee = (hours*1.5)*108.33;
        double rate = 108.33;
        double anet = rate*12;
        double net= anet+otfee;
      double tax= net*.12;
    double tded = tax;
    double netpay =net-tded;

              System.out.println("Employee name: "+Name);
        System.out.println("No of hours work: "+HoursOfWork);
        System.out.println("Net Income: "+net);
      System.out.println("Total Deduction: "+tded);
        System.out.println("Net Pay: "+netpay);
}
else if(HoursOfWork < 12){
        System.out.println("Employee name: "+Name);
        System.out.println("No of Hours Work: "+HoursOfWork);...

Comments

Express your owns thoughts and ideas on this essay by writing a grade and/or critique.

  1. No comments