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
Get step-by-step solutions from verified subject matter experts
