The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | Apr 2017 |
| Last Sign in: | 103 Weeks Ago, 3 Days Ago |
| Questions Answered: | 4870 |
| Tutorials Posted: | 4863 |
MBA IT, Mater in Science and Technology
Devry
Jul-1996 - Jul-2000
Professor
Devry University
Mar-2010 - Oct-2016
I need help with two programs, that include lookup tables and I have no idea how to work those. I'll attach the directions and the data file that goes with the household income program.
Â
PROGRAM 410t(Household Income Report)Program Description:The results ofa survey of the households in your townshiphave been made available.Each recordcontains data for one household, including afour-digit integer identification number, theannual income for the household, and thenumber of members of the household.Writea program to read the survey results intothree arrays, echo print the data and performand output the following analyses:1.Count the number of households includedin the survey and print a three-column tabledisplaying the data read in (assume no morethan 25 households)2.Calculate the average household income,and list the identification number and incomeof each household that exceeds the average.3.Determine the percentage of households having incomes below the poverty level.Thepoverty level income may be computed using the formula:p= $3750.00 + $750.00 * (m-2)where m is the number of members of each household.Run the program twice to verify it's accuracy.Statements Required:input, output, decision making, array, methods, classData Location:survey2.datsurvey.datSample Output:(your output will be in a single column and will include output from the second file)
Program 432a(galactic weight)Program Description:As space travels venture to the variousplanets and the moon in our galaxy their weight will vary.Write a programthat will convert the users weight on earth to their weight on a selectedplanet or the earth's moon.They should be prompted to enter their weightand select a planet by number from a list of planets.Range checkingshould be included in your solution.The program should continue to rununtil the user selects the quit option.The ratio of an object's weight on each of the planets to its weight on earth is shown in the table below:DestinationratioMercury.27Venus.85Moon.16Mars.38Jupiter2.64Saturn1.17Neptune1.12Pluto.25Be sure to run at least 5 test selections, including an invalid selection and includethem all in your output.Statements Required:input, output, loop control, decision making, array, method, classBe sure to print out the planet the user selected.See the sample output below.Sample Output:Convert your weight on earth to:1.Mercury2.Venus3.Moon4.Mars5.Jupiter6.Saturn7.Neptune8.Pluto9.QuitSelect a destination by number (or 9 to quit) 7Enter your weight: 160Your weight on Neptune would be 179.2 poundsConvert your weight on earth to:1.Mercury2.Venus3.Moon4.Mars5.Jupiter6.Saturn7.Neptune8.Pluto9.Quit
1041 12180 41062 13240 31327 19800 21483 22458 81900 17000 22112 18125 72345 15623 23210 3200 63600 6500 53601 11970 24725 8900 36217 10000 29280 6200 1
Attachments: