Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA WOULD BE BEST, IF NOT PYTHON Properties filing_status Description: Three possible values: 1=single, 2=married filing jointly, 3=married filing separately family_members Description: The total number

JAVA WOULD BE BEST, IF NOT PYTHON

Properties

filing_status

Description: Three possible values: 1=single, 2=married filing jointly, 3=married filing separately

family_members

Description: The total number of members of the filing persons family

total_income

Description: The total gross income of all the persons that are included in the filing

Methods

void read_data()

Description: It handles the reading from the input and the storage of the above class properties

void write_data()

Description: It handles the writing to the output of the final tax return result

float adjusted_gross_income(float income)

Description: It returns the adjusted gross income

Logic: Adjusted gross income is what remains in the income after subtracting the social security and medicare taxes. Social security rate is 12.4%. Medicare is 2.9% but it only applies to the first $100K of the income. Both social security and medicare taxes are split equally between employer and employee.

float standard_deduction(float income, byte filing_status, byte family_members)

Description: It returns the amount of income that is exempted from taxation

Logic: First of all, it cant be higher than the income. The base exemption is $3000. If a couple is filing jointly, both spouses are eligible for the exemption. If the income is above $100,000 the exemption is reduced by 0.5% per whole thousand dollars of income above 100K. Regardless of the income level, though, this reduction cannot exceed 30%. Base exemption for each child is $2000. If the family has more than two children, the child exemption is reduced by 5% for each additional child (i.e. for 3 kids -5%, for 4 kids -10%, and so forth). Regardless of the number of children, though, the childs exemption cannot be reduced by more than 50%.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Managing Your Information How To Design And Create A Textual Database On Your Microcomputer

Authors: Tenopir, Carol, Lundeen, Gerald

1st Edition

1555700233, 9781555700232

More Books

Students also viewed these Databases questions