subject

In c++ in this assignment, you will write a program that will read in a list of 12 doubles from a file. each double represents the total rainfall in inches for the 12 months of the year in month order. the 12 doubles should be written into an array. the program should do the following with the data: ? calculate the average rainfall for the year. ? determine which month had the lowest amount of rainfall. ? determine which month had the highest amount of rainfall. ? sort the array of rainfall in descending order (highest rainfall first) using a bubble sort. ? neatly display the average, minimum, and maximum rainfall. be sure to display the month of the minimum and maximum rainfalls. then display a table of month and rainfall amount from the sort that you did earlier. each of the monthly rainfall, average, minimum, and maximum rainfalls should be displayed to two decimal places. you will not be given a sample program for this assignment. you have already done a similar program for reading in values from a file and finding averages, minimums, and maximums. the most difficult part of the assignment will be to display the correct months with the correct rainfall values after you have sorted them. i would suggest using parallel arrays for rainfall and months and every time you swap array indices for rainfall, you do the same swap for the months. make sure you use good programming style. this includes commenting all your variables and commenting through your code. comments should explain why you are doing something. use good indentation (see my examples and the books examples for demonstration of good indentation). make sure variable names are self-documenting. make good use of white space. group logical sections together with one blank line between logical sections. your output should be neat and pleasant to read. make sure you follow the specifications. if you must, you can add to the program, but do not change the specifications in doing so. name your file pa4_lastname_firstname. cpp, replacing lastname with your actual last name and firstname with your actual first name. failure to properly name your file results in loss of points. cosc 1436 programming assignment 4 below is possible output for a sample run for this programming assignment: monthly rainfall for fort worth, tx 2014 minimum: september 0.06 maximum: august 4.34 monthly average for year: 1.77 sorted by total rainfall month inches august 4.34 may 3.40 june 3.26 november 2.13 october 2.09 april 1.74 march 1.45 december 1.13 july 0.98 february 0.41 january 0.33 september 0.06

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 08:00
What is the first step in creating a maintenance ?
Answers: 2
question
Computers and Technology, 22.06.2019 11:00
You receive an email from an impressive-sounding stranger, professor alexander rothschild renard iii, president of the american institute for scientific political statesmen. he urges you to vote for his presidential candidate choice. this social media red flag is known as
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
After you present a proposal, the committee starts asking you questions, some beyond the strict focus of your proposal. they ask questions about implications in other fields and knowledge about other fields. you are asked to redo your proposal. what is most likely missing? breadth of material depth of material clarity of material details of material
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Helen is having a meeting with her colleagues in her company. they are working on the goals and objectives for the coming year. they want to ensure that these goals and objectives of the processes involved are properly evaluated. which system can helen and her colleagues apply to evaluate this? helen and her colleagues require a blank to evaluate the goals and objectives.
Answers: 2
You know the right answer?
In c++ in this assignment, you will write a program that will read in a list of 12 doubles from a fi...
Questions