//File: Taxes2.java import CSLib.*; public class Taxes2 { public static void main (String [] args) { final double RATE1 = 0.15, //15& tax rate RATE2 = 0.25, //25% tax rate BRACKET = 50000.0; //$50,000 boundary //between the //two tax brackets double income, tax; InputBox in = new InputBox(); OutputBox out = new OutputBox(); in.setPrompt ("How much did you make last year? "); income = in.readDouble (); if (income <= BRACKET) //in lower tax bracket? { tax = RATE1 * income; out.println ("Low roller..."); } else //in second (higher) bracket? { tax = RATE1 * BRACKET //15% of first $50,000 + RATE2 * (income - BRACKET); //25% of amount //over $50,000 out.println ("Donald Trump!"); } out.println ("Your income was $ " + income); out.println ("Your tax is: $ " + tax); } }