I need help with this
The results of a survey of some households in the United States are available for public
scrutiny. Each record contains data for one household, including a four-digit integer
identification number, the annual income for the household, the number of household
members, and the state of the household.
Write a program to read the survey results into a
contains the main function, and perform the following analysis. Use the template,
Program10-Template.cpp to help you complete this assignment. Download it from
Blackboard and rename it to Program10.cpp. Do not use Arrays. You will not
receive credit for Program 10 if you do.
a) Print the record of each household included in the survey in a four-column format
with headings. The four-digit integer identification number, the annual income for
the household, the number of household members, and the state of the household.
b) Calculate and print the average household income.
c) List the identification number, income, members, and state of the households that
exceed the average in a four-column format with headings.
d) Determine and print the identification number, income, poverty level, members, and
state of the households, in a five-column format with headings, that have income
below the 2022 United States poverty level.
e) Determine and print the percentage of households that have income below the
2022 United States Federal Poverty Level (FPL).
f) There are several programs, including Medicaid, that use a percentage of the
Federal Poverty Level (FPL) as the income criteria for program participation. The
exact percentage of the FPL used for eligibility purposes varies based on the
program and the state. For example, many states use 138% of the FPL for
Medicaid eligibility. Assuming all the 50 states use this percentage, determine and
print the percentage of households that would qualify for Medicaid.
Compute the poverty level income using one of the formulas below.
povertyLevel = 18310.00 + 4720.00 * (m – 2)
If household is in the 48 contiguous states or the District Of Columbia
povertyLevel = 22890.00 + 5900.00 * (m – 2)
If household is in the state of Alaska
povertyLevel = 21060.00 + 5430.00 * (m – 2)
If household is in the state of Hawaii
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
income increases as m gets larger.
The input data is available in a file named, Program10.txt, and has the format of
identification number, annual income for the household, the number of household
members, and the state of the household.
Create a Class named, HouseHold, in a header file named, HouseHold.h, and a
source file named, HouseHold.cpp, that contain the attributes described earlier and
other necessary member functions. Write a test Class named, Program10.cpp, that
creates a Vector of HouseHold objects. See page Section 8.12, page 571 of the
textbook.
No input, processing or output should happen in the main function. All work in
the test class should be delegated to other functions in the class. Include the
recommended minimum documentation for each function.
Trending nowThis is a popular solution!
Step by stepSolved in 6 steps with 4 images
Is it possible to do this code in C++ ? I appreciate your time!!
Is it possible to do this code in C++ ? I appreciate your time!!
- 10 Build the Sudoku Reviewer ( the testing program). The specification is below. Please note: you DO NOT have to build a Sudoku solver. To test you just need to build a class that generates a 9x9 2D array with the values you want to test. You can assume the value types are valid. (integers from 1-9). 1-The main purpose is to make sure the Sudoku solver actually solved it correctly! 2- You are also confirming the solver solves puzzle in no longer than a minute 3- Solver (not the reviewer) requires 7 INDICES (ELEMENTS) filled in the input array at least. 4- The reviewer receives both the original puzzle and the solution. The Reviewer needs to confirm the solution is not only a valid SudoKu solution but also the solution to the original puzzle. 5- Solver will return a 2d array filled with -1s if input array has an error/bad input (exception). Reviewer will check for this case.arrow_forwardDefine a function named “getExamListInfo” that accepts an array of Exam objects and its size. It will return the following information to the caller: - The number of exams with perfect score - The number of exams with “Pass” status - The index of the Exam object in the array that has the largest score. For example, if you get the exam info for this array of Exam object Exam examList[] = { {"Midterm1 Exam", 90}, {"Midterm2 Exam", 80}, {"Final Exam", 50}, {"Extra Credit", 100}, {"Initial Test", 0}, {"Homework1", 69} } ; You will get Perfect Count: 1 Pass Count: 3 Index of the largest: 3 C++arrow_forwardIn c++ i have this information Type of Ticket &. Cost Monday. Adult= £25 and Child = £15 Thursday. Adult = £40 and child = £20 I have made a vector to store this information Vectorticket ={“Monday”, “Thursday”}; Vectoradult = {25, 40}; Vectorchildren ={15, 20}; Thr format of the adult and children vectors is in the order such that the first elements in those vectors correspond with the first element in the ticket vector Now what am struggling with, is i want the program to calculate the total cost of the tickets in correspondant with The user’s inputs which will be the quantity of how many tickets the user bought respectively (adult and children) So something like Monday 1 2 So 1 will be quantity of adult ticket and 2 will quantity of children ticket and the total costs of both added togetherarrow_forward
- C++ pleasearrow_forwarduse c++ Programming language Write a program that creates a two dimensional array initialized with test data. Use any data type you wish . The program should have following functions: .getAverage: This function should accept a two dimensional array as its argument and return the average of each row (each student have their average) and each column (class test average) all the values in the array. .getRowTotal: This function should accept a two dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a row in the array. The function should return the total of the values in the specified row. .getColumnTotal: This function should accept a two dimensional array as its first argument and an integer as its second argument. The second argument should be the subscript of a column in the array. The function should return the total of the values in the specified column. .getHighestInRow: This function should accept a two…arrow_forward1. Define a struct for a soccer player that stores their name, jersey number, and total points scored. 2. Using the struct in #1, write a function that takes an array of soccer players and its size as arguments and returns the average number of points scored by the players.3. Using the struct in #1, write a function that takes an array of soccer players and its size as arguments and returns the index of the player who scored the most points.4. Write a Circle class that has the following member variables:• radius : a double• pi : a double initialized with the value 3.14159The class should have the following member functions:• Default Constructor. A default constructor that sets radius to 0.0.• Constructor. Accepts the radius of the circle as an argument.• setRadius. A mutator function for the radius variable.• getRadius. An accessor function for the radius variable.• getArea. Returns the area of the circle, which is calculated as area = pi * radius * radius• getCircumference. Returns…arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education