Question: Write a program that displays the name of each month in a year and its rainfall amount, sorted in order of rainfall from highest to

Write a program that displays the name of each month in a year and its rainfall amount, sorted in order of rainfall from highest to lowest. The program should use an array of objects, where each object holds the name of a month and its rainfall amount. Use a constructor to set the month names and the rainfall amount. Make the program modular by using different functions: 1. to input the rainfall amounts 2. to sort the data, and 3. to display the data.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!