Create a class named Taxpayer. Data fields for Taxpayer class include the Social Security number (use a string for the type, but do not use dashes within the number), the yearly gross income, the tax owed, and totalTaxAmt (static). 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 calculated whenever the income is set. Assume the tax is 15% of income for incomes under $30,000 and 28% for incomes that are $30,000 or higher. After the tax owed is calculated, the tax owed is added into totalTaxAmt.

Write a program that asks user the number of Taxpayer and declares a dynamic array of the Taxpayer objects. Prompt the user for data for each object and display total tax amount. After the main function, write a function that compare each object based on tax owed; then display the objects in order by the amount of tax owed. Save the program as TaxPayerDemo.cs.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.