Overview
For this assignment, each student will write two programs to do the same thing. One program will interact with the user using pop-up windows, and the other program will interact with the user using the console window.
Details
The United States Internal Revenue Service collects taxes from those who earn income in the United States. Ignoring all tax deductions and loopholes, those who earn more are require to contribute a higher percentage of their income. The following table shows the tax brackets for 2016.
Rate | Single Filers | Married Joint Filers |
10% | $0 to $9,275 | $0 to $18,550 |
15% | $9,276 to $37,650 | $18,551 to $75,300 |
25% | $37,651 to $91,150 | $75,301 to $151,900 |
28% | $91,151 to $190,150 | $151,901 to $231,450 |
33% | $190,150 to $413,350 | $231,451 to $413,350 |
35% | $413,351 to $415,050 | $413,351 to $466,950 |
39.6% | $415,051+ | $466,951+ |
Note that the first $9,275 of all single filers income is taxed at the 10% rate, the next $28,375 (= 37,650 - 9,275) is taxed at 15%, etc... For example, taxes due for a single filer with $50,000 in income would be $8,271.25, which is calculated as follows:
0.10 * 9275 + 0.15 * 28375 + 0.25 * 12350
Write a program that asks the user if they are a single filer or married joint filer. It should then ask for their expected earned income for 2016 and display the estimated taxes they will be required to pay by March 15, 2017.
You may develop your own technique for determining if the user is a single or married joint filer, but it must be obvious to the user when the program is run (provide clear instructions).
The first program should be written in a class called
Lab3GUI
and should interact with the user using
pop-up windows (JOptionPane
).
The second program should be written in a class called
Lab3Console
and should interact with the user
using the console window.
A sample program interaction for the console version is shown below:
Are you a single filer or a married joint filer (enter 's' or 'j'): s Enter an estimate of your earned income for 2016: 50000.00 Your estimated taxes for 2017 are: $8271.25
Both programs must be created in a package named the same as your MSOE username (e.g., mine is taylor). If you do not remember how to create a project, package, or class, please ask your instructor.
Lab Deliverables
Prof. Jones' class: See Blackboard
See Dr. Dennis for instructions
Dr. Riley's class: See Blackboard
Dr. Taylor's class: See below
See Prof. Thomas for instructions
Acknowledgement
This laboratory assignment was developed by Dr. Chris Taylor.