Create a class name Taxpayer. Data fields for taxpayer objects include the Social Security number (use a string for the type, but do not use dashes within the number), the yearly gross income, and the 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 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. Write a program that declares an array of ten Taxpayer objects. Prompt the user for data for each object and display the ten objects. Save the program as TaxPayerDemo.cs
Unfortunately, your question requires more work than to be done for free. You can submit it as an assignment to our control panel set the deadline and our programmers will assist you.
Leave a comment