Question
(C++) Plan and code a modular program utilizing an array of structures for the following problem: The results of a survey of the households in
(C++)Plan and code a modular program utilizing an array of structures for the following problem: The results of a survey of the households in Woodland Hills have been made available. Each record contains afour-character identification code, the annual income for the household, and the number of members of thehousehold. Write a program that inputs the information from a file and then presents a MENU of optionsavailable to the user. The options should include: A. Print all of the input data with appropriate column headings.
B. Calculate the average household income and list the identification codes and income of each household whose income is greater than the average.
C. Determine the percentage of households having an income below the poverty level. The formula fordetermining the poverty level is P = $8000.00 +$500.00 * (M- 2) where M is the number of members ofthe household.
D. Print all of the input data sorted by household income. E. Calculate and print the median household income. The median is the middle value of a sorted list. If thelist contains an even number of entries, the median is the average of the two middle values.
Input Input the record information into an array of structures. Use the data file below. Display a well-formatted menu ofchoices for the user. BE SURE TO ADEQUATELY TEST EACH CHOICE ON YOUR MENU. Do NOT test the options inorder. Create the data file below in text editor or Notepad.
Data File WHVC 34000.00 5
AAAA 10500.00 8
BURB 23500.00 2
CCCC 15000.00 4
DATA 8000.00 3
EEEE 36000.00 5
FADE 8500.00 4
GATE 25000.00 1
HILO 3000.00 1
JURY 100000.00 5
KNEL 80000 4
LIST 41000.00 3
MEMM 5000.00 2
PQRS 18000.00 2
RELM 27500.00 4
SOLD 22100.00 2
Output Output the appropriate information for the user. Print out each of these options to a data file.
Step 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