Question
The results of a survey of the households in your township have been made available. Each record contains data for one household, including a four-digit
The results of a survey of the households in your township have been made available.
Each record contains data for one household, including a four-digit integer identification number, the annual income for the household, and the number of members of the household.
Write a program to read the survey results into three arrays and perform the following analyses:
a) Count the number of households included in the survey and print a three-column table displaying the data read in. (You may assume that no more than 25 households were surveyed.)
b) Calculate the average household income, and list the identification number and income of each household that exceeds the average.
c) Determine the percentage of households having incomes below the poverty level.
The poverty level income may be computed using the formula: P = $6500.00 + $750.00 X (m - 2) where m is the number of members of each household. This formula shows that the poverty level depends on the number of family members, m, and the poverty level increases as m gets larger. Test your program on the following data:
Identification number 1041 1062 1327 1483 1900 2112 2345 3210 3600 3601 4725 6217 9280 Household members Annual income 12,180 13,240 19,800 22,458 17,000 18,125 15,623 3,200 6,500 11,970 8,900 10,000 6,200 4 2 2 7 3 2Step 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