Write a Java program that will calculate an estimated tax for either a single or married taxpayer, given a keyboard income entry. After the income is entered, a code status "S" for sinle or "M" for married is entered.
The necessary classes are a Tax class with a main()method for keyboard entry of income and code status values, and a TaxReturn class to calculate the tax based on the input. The input values should be passed from the Tax class to the TaxReturn class through the instantiation of a TaxReturn object. The instantiation could take a form such as TaxReturn a TaxReturn = new TaxReturn(income, status);
For taxpayers, two tax rates are needed, 15 percent and 30 percent. For single taxpayers, the cutoff rate of 15 percent is $10,000 and 30 percent above $10,000. For married taxpayers, the cutoff rate is 15% for the amount below $20,000 and 30 percent for amounts of $20,000 and above.
Program output should show the code status, income and the amount of tax.
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
Java - Windows XP
Complied using TextPad