Answered step by step
Verified Expert Solution
Question
1 Approved Answer
*Program has to be written in C# CIS162AD: Chapter9 Assignment TaxPayerDemo Programming Exercise 6 (pg. 418-419) Create a program named TaxPayerDemo that declares an array
*Program has to be written in C#
CIS162AD: Chapter9 Assignment TaxPayerDemo Programming Exercise 6 (pg. 418-419) Create a program named TaxPayerDemo that declares an array of 10 Taxpayer objects. Prompt the user for data for each object and display the 10 objects. Data fields for Taxpayer objects include the Employee number (use a string for the type, but do not use dashes within the Employee number), the yearly gross income, and the income tax owed. Include a property with get and set accessors for the first two data fields, but make the tax owed a read-only property. The tax should be cakculated whenever the income is set. Assume that the tax rate is 15 percent for incomes under $30,000 and 28 percent for incomes that are $30,000 or higher. Extra Credit: Create a program named TaxPayerDemo2 so that afier the 10 Taxpayer objects are displayed, they are sorted in order by the amount of tax owed and displayed again. Modify the Taxpayer cass so its objects are comparable to each other based on tax owed. Sample Output for TaxPayerDemo Output is shown only for 5 taxpayers. Enter Social Security Number for taxpayer 1 11111 Enter gross income for taxpayer 1 50000 Enter Social Security Number for taxpayer 2 22222 Enter gross income for taxpayer 2 64000 Enter Social Security Number for taxpayer 3 33333 Enter gross income for taxpayer 3 45000 Enter Social Security Number for taxpayer 4 44444 Enter gross income for taxpayer 4 45006 Enter Social Security Number for taxpayer 5 55555 Enter gross income for taxpayer 5 78e00 Tax is $14,000.ee Taxpayer # 2 SSN: 22222 income $64,000.00 Tax is $17,920.ee Taxpayer # 3 SSN: 33333 income $45,000.00 Tax is $12,600.ee Taxpayer # 4 SSN: 44444 income $.45,000 .00 Tax is $12,600.ee Taxpayer # 5 SSN: 55555 income $78,000.00 Tax is $21,840.ee Press any key to continueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started