How would I call a method on here for each question? I've tried some different things but it won't work for me. Here is what i have so far:
import java.util.Scanner;
public class TaxCalc
{
public static void main(String [] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.print("Enter number of dependents: ");
int dependents=keyboard.nextInt();
System.out.print("Enter number of pigs: ");
int pigs= keyboard.nextInt();
System.out.print("Enter number of oinks: ");
double oinks=keyboard.nextDouble()-(pigs*500)+(200*dependents);
System.out.println("Oinks after rewards: " + oinks);
if(oinks<10000) oinks -= oinks*0.02; //2% tax
else if(oinks<5000) oinks -= oinks*0.1; //10% tax
else oinks -= oinks*0.2; //20% tax
System.out.println("Oinks after penalties: " + oinks);
}
}