Design a class named PayCheck. The class contains: the data fields firstName, lastName, annualSalary, filingStatus, and any data fields that are relevant to help you solve the problem.
Then write a program that asks the user to enter their first name, last name, annual salary, and how many children s/he has. A user may have no child at all.
Then calculate the taxable income for the user based on the rate available here http://taxfoundation.org/article/2016-tax-brackets under the table Estimated Income Tax Brackets and Rates. After calculating the taxable income, determine the earned income tax credit based on the rate available here http://www.cbpp.org/research/federal-tax/chart-book-the-earned-income-tax-credit-and-child-tax-credit
Specifically, refer to the two graphs "Earned Income Tax Credit for Households with one Child, 2016" and "Earned Income Tax Credit for Households with two Children, 2016" Only people that are heads of households or filing jointly qualify for the earned income tax credit. People who have more than 2 children do not qualify for any additional earned income tax credit other than the one outlined in the link above.
Then calculate the take home salary after the taxes and earned income credit.
Please write in Java, Thanks.
JAVA CODE:----------->>>>>>
import java.util.Scanner;
public class payCheck {
public static void main(String args[]){
Scanner in=new
Scanner(System.in);
System.out.print("Enter the First
name\n");
String first=in.next();
System.out.print("Enter the Last
name\n");
String last=in.next();
System.out.print("Enter the Annual
Salary\n");
int Asalary=in.nextInt();
System.out.print("Enter the Filing
Status\n");
System.out.print("1.single\n");
System.out.print("2.married\n");
System.out.print("3.householder\n");
String status =in.next();
status.toLowerCase();
System.out.print("Enter Number of
children you have\n");
int children=in.nextInt();
double taxpercent=0;
double eitc=0;
taxpercent=payCheck.TaxpercentCal(status,
Asalary,taxpercent);
double
IncomeTax=(taxpercent*Asalary)/100;;
eitc=payCheck.EitcCal(Asalary,status, eitc,children);
double
homesalary=Asalary-IncomeTax+eitc;
System.out.print("\n");
System.out.print(first + last + "
Annual Income Details are :\n\n");
System.out.print("Income Tax
Percent applicable to " + first + last + " is:- "+ taxpercent +
"%\n\n");
System.out.print( "Total Income tax
Paid by " + first + last + " is:- "+ IncomeTax+"\n\n");
System.out.print(" Earned Income
Tax Credit received by " + first + last + " is:-
"+eitc+"\n\n");
System.out.print("Total Home Salary
of" + first + last + " is:- "+homesalary+"\n");
}
public static double TaxpercentCal(String
status,int Asalary,double taxpercent){
if(status.equalsIgnoreCase("single")){
if(Asalary<9275){
taxpercent= 10;
}
else
if(Asalary>=9275 && Asalary<37650){
taxpercent= 15;
}
else
if(Asalary>=37650 && Asalary<91150){
taxpercent= 25;
}
else
if(Asalary>=91150 && Asalary<192150){
taxpercent= 28;
}
else
if(Asalary>=192150 && Asalary<413350){
taxpercent= 33;
}
else
if(Asalary>=413350 && Asalary<415050){
taxpercent= 35;
}
else{
taxpercent= 39.6;
}
}
else
if(status.contentEquals("married")){
if(Asalary<18550){
taxpercent= 10;
}
else
if(Asalary>=18550 && Asalary<75300){
taxpercent= 15;
}
else
if(Asalary>=75300 && Asalary<151900){
taxpercent= 25;
}
else
if(Asalary>=151900 && Asalary<231450){
taxpercent= 28;
}
else
if(Asalary>=231450 && Asalary<413350){
taxpercent= 33;
}
else
if(Asalary>=413350 && Asalary<466950){
taxpercent= 35;
}
else{
taxpercent= 39.6;
}
}
else
if(status.contentEquals("householder")){
if(Asalary<13250){
taxpercent= 10;
}
else
if(Asalary>=13250 && Asalary<50400){
taxpercent= 15;
}
else
if(Asalary>=50400&& Asalary<130150){
taxpercent= 25;
}
else
if(Asalary>=130150 && Asalary<210800){
taxpercent= 28;
}
else
if(Asalary>=210800 && Asalary<413350){
taxpercent= 33;
}
else
if(Asalary>=413350 && Asalary<441000){
taxpercent=
35;
}
else{
taxpercent= 39.6;
}
}
else{
System.out.print("Enter Valid Status\n");
}
return taxpercent;
}
public static double EitcCal(int Asalary,
String status,double eitc,int children){
if(status.contentEquals("householder") &&
children==1){
if(Asalary<10000){
eitc=1500+((7/25)*(Asalary-5000));
}
else
if(Asalary>=10000 && Asalary<20000){
eitc =3400;
}
else
if(Asalary>=20000 && Asalary<40000){
eitc=1500-((17/100)*(Asalary-30000));
}
else{
eitc=0;
}
}
else
if(status.contentEquals("householder") &&
children==2){
if(Asalary < 15000){
eitc=((2/15)*Asalary);
}
else if(Asalary>=15000 &&
Asalary<75000){
eitc=2000;
}
else if(Asalary>=75000 &&
Asalary<112500){
eitc=(-4/75)*(Asalary-112500);
}
else{
eitc=0;
}
}
else if(status.contentEquals("married") &&
children==1){
if(Asalary<10000){
eitc=1500+((7/25)*(Asalary-5000));
}
else if(Asalary>=10000
&& Asalary<25000){
eitc=3400;
}
else if(Asalary>=25000
&& Asalary<44000){
eitc=3400-((17/95)*(Asalary-25000));
}
else{
eitc=0;
}
}
else if(status.contentEquals("married") &&
children==2){
if(Asalary < 15000){
eitc=((2/15)*(Asalary));
}
else if(Asalary>=15000 &&
Asalary<112500){
eitc=2000;
}
else if(Asalary>=112500 &&
Asalary<150000){
eitc=(-4/75)*(Asalary-150000);
}
else{
eitc=0;
}
}
else{
System.out.print("Enter Valid Status\n");
}
return eitc;
}
}
SAMPLE OUTPUT:---------------->>>>>>>
![Problems @ Javadoc Declaration Console 3 <terminated> payCheck [Java Application] C:\Program FilesJavajre1.8.0_111\bin\javaw.](http://img.homeworklib.com/questions/c2c5ba60-cac9-11ea-b222-7f72be8ed118.png?x-oss-process=image/resize,w_560)
Design a class named PayCheck. The class contains: the data fields firstName, lastName, annualSalary, filingStatus, and...
Design a class for python named PersonData with the following member variables: lastName firstName address city state zip phone Write the appropriate accessor and mutator functions for these member variables. Next, design a class named CustomerData , which is derived from the PersonData class. The CustomerData class should have the following member variables: customerNumber mailingList The customerNumber variable will be used to hold a unique integer for each customer. The mailingList variable should be a bool . It will be...
Hello my name is Pete. I am looking to improve in this class and wanted to see if anyone would be able to help me with these questions. Thank you ahead of time. Here is the information. Erica Swanson (SSN 376-38-4930), age 46, is a single parent with three children: Her biological son, Sean Swanson (age 19) is a part-time college student who works fulltime as a landscaper Her biological daughter, Brooklyn Swanson (age 14) Her adopted daughter, Sydney Swanson...
Develop a set of classes for a college to use in various student service and personnel applications. Classes you need to design include the following: • Person — A Person contains the following fields, all of type String: firstName, lastName, address, zip, phone. The class also includes a method named setData() that sets each data field by prompting the user for each value and a display method that displays all of a Person’s information on a single line at the...
Jonathan and Patric a are mar ed and lejonty. In 2018 Jonathan earned a salary $94,000. Patnc a เร self-employed. Her gross business ncome was $96 000 and her business expenses totaled S53000 Their itemized deductions total $27,500. Compute Parts a, b, and c without regard to self-employment tax. ac contributed S5 00 to a deductible IRA (Click the icon to view the standard deduction and child credit amounts.) click the icon to view the 2018 tax rate schedule tor...
e are married and earned salaries this year of $64.000 and $12.000. respectively In addition 54. they received interest of $350 fro etirement account. and Marc paid alimony to a prior spouse in the amount of Sl son. Matthew. who lived with them throughout the entire year. Thus.Marc and Michell credit for Matthew.Marc and Michelle paid $6.000 ofexpenditures that qualify, as itemized deductions and they had a total of S5.500 in federal income taxes withheld from their paychecks during the...
Chapter 4 (In-Class Assignment) Multiple Choice (CPA Adapted) 1. Parker, whose spouse died during the preceding year has not remarried. Parker maintains a home for a dependent child. What is Parker's most advantageous filing status? A. Single B. Head of Household C. Married Filing Separately D. Qualifying Widow(er) 2. Janet and Ted have two children, ages 8 & 10. Janet's mother, Martha, resides in a nursing home nearby. Martha's only income is S1,500 a month in social security. Janet and...
Please carefully look at the instructions and asnswe it. i
have also attached the 2019 1040 Form and Schedule 1.
Please show your work on the tax return form as well.
Thank you so much in advance
Use
2020 Tax Rates Schedules
That is all the information i have
Required information [The following information applies to the questions displayed below.) Marc and Michelle are married and earned salaries this year of $64,000 and $12,000, respectively. In addition to their salaries,...
1). The retirement benefit of the Social Security program is
considered a progressive benefit with a regressive financing
scheme.
(1) How is the Social Security benefit progressive?
(2) How is its financing scheme regressive?
2). One of the main goals of the ACA (Patient Protection and
Affordable Care Act of 2010, aka Obamacare) was to provide
affordable health care to the uninsured.
1. What were the THREE primary pieces of the law that were meant to
provide coverage for everyone...
Alfred E. Old and Beulah A. Crane, each age 42, married on
September 7, 2016. Alfred and Beulah will file a joint return for
2018. Alfred's Social Security number is 111-11-1112. Beulah's
Social Security number is 123-45-6789, and she adopted "Old" as her
married name. They live at 211 Brickstone Drive, Atlanta, GA
30304.
Alfred was divorced from Sarah Old in March 2016. Under the
divorce agreement, Alfred is to pay Sarah $1,250 per month for the
next 10 years...