Create a class named Taxpayer. Data fields for Taxpayer include yearly gross inc
ID: 3655907 • Letter: C
Question
Create a class named Taxpayer. Data fields for Taxpayer include yearly gross income and Social Security number (use an int for the type, and do not use dashes within the Social Security number). Methods include a constructor that requires values for both data fields, and two methods that each return one of the data field values. Write an application named UseTaxpayer that declares an array of 10 Taxpayer objects. Set each Social Security number to 999999999 and each gross income to zero. Display the 10 Taxpayer objects. Save the files as Taxpayer.java and UseTaxpayer.java. Modify your UseTaxpayer application so each Taxpayer has a successive Social Security number from 1 through 10 and a gross income that ranges from $10,000 to $100,000, increasing by $10,000 for each successive Taxpayer. Save the file as UseTaxpayer2.java.Explanation / Answer
using System; namespace TaxPayerDemo { class TaxPayerDemo { public static void Main(string[] args) { string[] socialSecurityNumber = new string[10]; int[] grossIncome = new int[10]; double[] taxArray = new double[10]; string inputstring; for (int x = 0; xRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.