[solved]-Write Console C Program Two Classes Householdcensus Class Householdcensus Class Declares F Q39034937
Write a console C# program that has twoclasses.
HouseholdCensus Class
The HouseholdCensus class declares four private arrays to store thefollowing information respectively:
Names of heads of households (type string)
Annual income of household (type double)
Number of household members (type int)
Assistance code (type char)
The arrays should be declared inside class (they should not beglobal).
Each of the arrays should have a size of 10. NOTE: do not usecollections such as ArrayList or List
The HouseholdCensus class also declares a private integer countervariable.
The HouseHoldCensus class should have four public methods toperform the following tasks:
A constructor method that initializes the counter to 0.
An inputHouseholdInfo() method. This method reads names,incomes, and members information into the arrays. It does thisusing a loop inside which are statements to input household name,income and number of members and save them in the arrays. The loopshould repeat until a user enters ‘n’ in response to the question,“Do you have more households to enter? (y/n) ” The counter isincreased by 1 for each household data set ofname-income-members
A determineAssistance() method that should have a loop tocheck the income and number of members of each household and save‘Y’ if qualifies for assistance or ‘N’ if not in the assistancecode array. A household qualifies for assistance if income is belowthe given levels below corresponding to household size:
Household Size* Maximum Income Level (Per Year)
1 $15,782
2 $21,398
3 $27,014
4 $32,630
5 $38,246
6 $43,862
7 $49,478
8 $55,094
*For households with more than eight people, add $5,616 peradditional person.
This task is done by looping from an index of 0 to counter.
A displayHouseholdInfo() method. This receives all the arrays andthe counter as parameters. It then loops through the parallelarrays to display a table in the following format (the names andnumbers are just examples. They are replaced by actual numbers andamounts and names as input by the user):
HOUSEHOLD NAME ANNUAL INCOME NUMBER OF HOUSEHOLD MEMBERSASSITANCE?
—————————- ———————————————————— ——————-
Scott Teslo 5,234,867.12 5 N
Isen Konowa 27,555.00 6 Y
William Ghettis 123,456.78 3 N
AVERAGE INCOME 54,326.11
The headings are displayed before entering the loop. A loop runsfrom index of 0 to counter. Inside the loop is a singleConsole.WriteLine statement to display all contents of the arraysindexed by the current index. The average income line comes in aConsole.WriteLine after the loop.
UtahIncomes Class
This class will define a Main( ) method. The following will be donein the Main method. 1. Instantiate an object of HouseholdCensusclass. 2. process a menu in a loop that ends when 4 is selected bya user. The menu should be as follows:
1. Input households information
2. Determine assistance qualification
3. Display household report
4. Exit
When the user enters:
1 – call the inputHouseholdInfo() of the object
2 – call the determineAssistance() method of the object, and
3 – call displayHouseholdInfo() method of the object(user shouldselect 2 before selecting 3)
When the user enters 4, the program should end after displaying amessage:
“Thank you for using our household census program.”
Expert Answer
Answer to Write a console C# program that has two classes. HouseholdCensus Class The HouseholdCensus class declares four private a… . . .
OR

