Lab 3
Start Now
## 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 2017. <table class="striped2"> <tr><td>Rate</td> <td>Single Filers</td> <td>Married Joint Filers</td></tr> <tr><td>10%</td> <td>$\$0$ to $\$9,325$</td> <td>$\$0$ to $\$18,650$</td> <tr><td>15%</td> <td>$\$9,326$ to $\$37,950$</td> <td>$\$18,651$ to $\$75,900$</td> <tr><td>25%</td> <td>$\$37,951$ to $\$91,900$</td> <td>$\$75,901$ to $\$153,100$</td> <tr><td>28%</td> <td>$\$91,901$ to $\$191,650$</td> <td>$\$153,101$ to $\$233,350$</td> <tr><td>33%</td> <td>$\$191,651$ to $\$416,700$</td> <td>$\$233,351$ to $\$416,700$</td> <tr><td>35%</td> <td>$\$416,701$ to $\$418,400$</td> <td>$\$416,701$ to $\$470,700$</td> <tr><td>39.6%</td><td>$\$418,401+$</td> <td>$\$470,701+$</td> </table> Note that the first $ \$9,325$ of all single filers income is taxed at the 10% rate, the next $ \$28,625 (= 37,950 - 9,325)$ is taxed at 15%, etc... For example, taxes due for a single filer with $ \$50,000$ in income would be $ \$8,238.75$, which is calculated as follows: $ 0.10 \times 9325 + 0.15 \times 28625 + 0.25 \times 12050$ 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 2018 and display the estimated taxes they will be required to pay by March 15, 2018. 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`](http://download.oracle.com/javase/8/docs/api/javax/swing/JOptionPane.html)). 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: <pre> Are you a single filer or a married joint filer (enter 's' or 'j'): s Enter an estimate of your earned income for 2017: 50000.00 Your estimated taxes for 2017 are: $8238.75 </pre> 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 <div class="notetip">See your professor's instructions for details on submission guidelines and due dates. <center> See Prof. Jones for instructions<br /> See Dr. Retert for instructions<br /> Dr. Taylor's class: submit using the form below<br /> See Dr. Thomas for instructions </center> If you have any questions, consult your instructor.</div> ## Acknowledgement This laboratory assignment was developed by [Dr. Chris Taylor](/taylor/).

Wednesday, 04-Oct-2017 10:38:00 EDT