Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Create a project which will accept information about employee pay and then displ

ID: 3697271 • Letter: C

Question

Create a project which will accept information about employee pay and then display calculated results. The project should contain at least your executable class as well as an Employee class. Your executable class should first ask the user for an Annual Salary amount. Then it should allow the user to enter information about one or more taxes; - tax type (P for percentage, A for annual amount, B for biweekly amount) - tax percent or amount After all the taxes have been entered, the program should display biweekly gross pay (before taxes), total biweekly taxes, and biweekly net pay (after taxes). Assume 52 weeks per year. The salary and tax amounts should be checked so that only meaningful, reasonable values are accepted.

Explanation / Answer

Employe Class


public class Employee {
   private Double AnualSalaryAmountOfEmployee;
  
   private Double P;
   private Double A;
   private Double B;
   public Employee(Double anualSalaryAmountOfEmployee, Double p, Double a,
           Double b) {
       super();
       AnualSalaryAmountOfEmployee = anualSalaryAmountOfEmployee;
       P = p;
       A = a;
       B = b;
   }
   public Double getAnualSalaryAmountOfEmployee() {
       return AnualSalaryAmountOfEmployee;
   }
   public void setAnualSalaryAmountOfEmployee(Double anualSalaryAmountOfEmployee) {
       AnualSalaryAmountOfEmployee = anualSalaryAmountOfEmployee;
   }
   public Double getP() {
       return P;
   }
   public void setP(Double p) {
       P = p;
   }
   public Double getA() {
       return A;
   }
   public void setA(Double a) {
       A = a;
   }
   public Double getB() {
       return B;
   }
   public void setB(Double b) {
       B = b;
   }
  
  
  
  

}


Executable Class

import java.util.Scanner;


public class Executable {
   Double AnualSalaryAmountOfEmployee;
   Double P;
   Double A;
   Double B;
Double BiweeklyGrossPayBeforeTaxes1;
Double TotalBiweeklyTaxesAfterTaxes1;
Double BiweeklyNetpayAfterTaxes1;

   public void BiweeklyGrossPayBeforeTaxes(){
       System.out.println("Enter the totalAnual salary");
       Double BiweeklyGrossPayBeforeTaxes1=2*(AnualSalaryAmountOfEmployee/52);
       System.out.println(" "+BiweeklyGrossPayBeforeTaxes1);
       }
   public void TotalBiweeklyTaxesAfterTaxes(){
       System.out.println("Enter the value of all taxes");
       Double TotalBiweeklyTaxesAfterTaxes1=2*((P+A+B)/52);
       System.out.println(""+ TotalBiweeklyTaxesAfterTaxes1);
   }
   public void BiweeklyNetpayAfterTaxes(){
       System.out.println("BiweeklyGrossPayBeforeTaxes");
       Double BiweeklyNetpayAfterTaxes1=(BiweeklyGrossPayBeforeTaxes1)+(TotalBiweeklyTaxesAfterTaxes1);
      
      
      
   }
  
   public static void main(String[] args) {
       System.out.println("Enter the value of AnualSalaryAmountOfEmployee ");
      
       Scanner AnualSalaryAmountOfEmployee = new Scanner(System.in);
       String l = AnualSalaryAmountOfEmployee.nextLine();
      
       //We are taking the value of the taxes as input
      
          Scanner P = new Scanner(System.in);
          System.out.println("Enter the value of P ");
          
           String m = P.nextLine();
          
           System.out.println("Enter the value of A ");
          
          Scanner A = new Scanner(System.in);
          String n = A.nextLine();
      
      
          System.out.println("Enter the value of B ");
          
          Scanner B= new Scanner(System.in);
           String o = B.nextLine();
          Executable ex=new Executable();
          ex.BiweeklyGrossPayBeforeTaxes();
       ex.TotalBiweeklyTaxesAfterTaxes();
       ex. BiweeklyNetpayAfterTaxes();
      
      
      
      

   }

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote