Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Input file.txt : https://www.dropbox.com/s/6dml0rz8lzb2nty/HADS.txt?dl=0 Write a program to determine the average amount households spend on housing (rent or mortgage) based on their income. The U.S.

Input file.txt : https://www.dropbox.com/s/6dml0rz8lzb2nty/HADS.txt?dl=0 image text in transcribed
image text in transcribed
Write a program to determine the average amount households spend on housing (rent or mortgage) based on their income. The U.S. Department of Housing and Urban Development's (HUD) Housing Affordability Data System (HADS) provides data samples of housing and income from across the country. Your instructor has provided you with select information from HADS in the file HADS.txt with about 59,000 lines of data. Each line in the file contains: Age Region int Built Value int Tenure int Utility Cost Income int Age of the head of household Census region Year the house was built Value of the house Rent or mortgage indicator Utility costs Monthly rent or mortgage Annual household income int int double double m only needs the Cost and Income values, but your program must Your progra in the file. The first line of the file contains header information. Your progranm readLine ) once in the beginning to get past the header read all data values should call You need to group the data by income. Each group represents a salary range of $10,000. You need to separate the households that have an income less than $10,000 from the many lines of data that show zero income. You also need to group the few households with large incomes into the t group. Your program can create an index for each group b if (income0) ) else if (income200000) )else( y: index0 index = 20; index-income10000 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions