Question: Tax Payer Your task is to implement a TaxPayer class with the following attributes: the social security number (use a string for the type), the

 Tax Payer Your task is to implement a TaxPayer class withthe following attributes: the social security number (use a string for the

Tax Payer Your task is to implement a TaxPayer class with the following attributes: the social security number (use a string for the type), the yearly gross income (double), and the tax owed (double) The tax is 15% of income for incomes under $30000 and 28% for incomes that are $30000 or higher You can start with the following template: public class TaxPayer TODO: Add attributes public TaxPayer TODO Add an overloading constructor that takes two inputsi social security and gross ineone TODO: Add at leaat the three rethods described below Give a TaxPayer Y, the following methods should be defined Y.getGrossIncome ()returns Y's gross income as a double Y.getTaxowedreturns Y's tax owed as a double ? print ( ) prints Y's tax information (see example below) A constructor that takes two parameters: social security number and gross income will be needed to instatiate a TaxPayer object. Then, the tax owed can be computed from these two given inputs. Your implementation should meet the following additional criteria: source file is named as TaxPayer.java income and tax is printed to two decimal places

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!