Will someone look at this and maybe give a pointer on why only zero's are being returned.
public class employee {
String name;
int id;
int salary;
int age;
String position;
void display(){
System.out.println("Federal Tax" +getFedTax);
System.out.println("Social Security Tax" +getSsTax);
System.out.println("Health Fee" +getHealthFee);
System.out.println("Insurance" +getInsurance);
System.out.println("Net Pay" +getNetPay);
}
int getFedTax;
int fedtax = salary;
double fedtax1 = (fedtax-800)*.17;
int getSsTax;
int sstaxrate = 5;
double sstax = salary*.05;
int getHealthFee;
int healthrate = 5;
double healthfee = salary*.05;
int getInsurance;
int insurancerate;
{
if (age<40)
insurancerate = 3;
else if(age<=50)
insurancerate = 4;
else if(age<=60)
insurancerate = 5;
else if(age>60)
insurancerate = 6;
getInsurance = ((insurancerate*10^-3)*salary);
}
double getNetPay;
double netpay = salary-fedtax1-sstax-healthfee-getInsurance;
}
HERE IS MY MAIN CLASS
public class employeeMain {
public static void main(String[] args) {
{
employee employee1 = new employee();
employee1.name = "dave johnson";
employee1.id = 1234;
employee1.salary = 50000;
employee1.age = 45;
employee1.position = "supervisor";
employee1.display();
}
}
}