I have the following two .class files that I cna not get the "ttest" variable to pass between the two? Very very new to
java and I am going crazy this is not working or file 1 will not compile ? HELP!!!
file 1
import java.util.Scanner;
public class Tax
{
public static void main(
String[] args)
{
Scanner in = new Scanner(System.in);
System.out.print("Please Enter Your Adjusted Gross Income: ");
double agi = in.nextDouble();
System.out.print("Dependents");
double dep = in.nextDouble();
Schedule
test = new Schedule (agi,dep,ttst);
System.out.println(test.dduct());
}
}
File 2
public class Schedule
{
private static final double sd1 = 5350;
private static final double sd2 = 3400;
public double agi;
public double dep;
public double ttest ;
public Schedule(double aIncome, double aDepi, double aTest )
{
agi = aIncome;
dep= aDepi;
ttest = aTest;
}
public double dduct()
{
double deduct = 0;
if (dep > 0)
deduct = ((agi - sd1)-(dep*sd2));
return deduct;
}
}