Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do not use vector, break and continue while true and share the output as well make it simple not too much CS 1 1 6

Do not use vector, break and continue while true and share the output as well make it simple not too much CS 116- Programming Fundamentals for Computer Science Lab #8A
Objectives
To learn to code, compile and run a program containing an array of structures.
Assignment
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 a four-character identification code, the annual income for the household, and the number of members of the household. Write a program that inputs the information from a file and then presents a MENU of options available 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 for determining the poverty level is P=$8000.00+$500.00**(M-2) where M is the number of members of the 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 the list 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 wellformatted menu of choices for the user. BE SURE TO ADEQUATELY TEST EACH CHOICE ON YOUR MENU. Do NOT test the options in order. Create the data file below in text editor or Notepad.
\table[[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-test all options (not in order). Turn in output and top-down design.
image text in transcribed

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions