//File:  Taxes.java
import java.text.DecimalFormat;
import CSLib.*;
public class Taxes
{
	public static void compute()
	{
		//Input dialog with user
		InputBox in = new InputBox ( "Salary Input" );
		in.setPrompt ( "How much did you make last year?" );
		double salary = in.readDouble ();
		
		//Calculate the tax due
		final double RATE = 0.2; //20% Tax Rate
		
		double tax = RATE * salary;
		
		//Output the results
		OutputBox out = new OutputBox ( "Your Taxes" );
		out.setSize ( 250, 75 );
		out.setLocation ( 300, 300 );
		
		DecimalFormat guy = new DecimalFormat ( "0.00" );
		
		out.println ( "Your income was: $ " + guy.format ( salary ) );
		out.println ( "Your tax due is: $ " + guy.format ( tax ) );
	}
}
