
Write a java application that allows the user to read, display, sort and search the total rainfall (type double, e.g. 22.50) for each of 12 months (January to December). The rainfall for all 12 months must be stored in an array/ArrayList. The application should display and execute a menu with the following options. A switch statement must be used to execute the following menu options 1. Read the rainfall for 12 months 2. Display the rainfall for 12 months 3. Display the total rainfall and the average monthly rainfall 4. Display the month with the most rainfall 5. Display the month with the least rainfall 6. Sort the rainfall in ascending order 7. Search and display the month which has rainfall equal to the given rainfall 8. Exit from application 1. Read the rainfall for 12 months This option allows the user to read the rainfall (e.g. 22.50) for each month from the keyboard and store it in an array/arrayList. The rainfall for all 12 months (January to December) must be read and stored. The input should be validated (e.g. if the user enters a rainfall less than 0 then an appropriate message should be displayed and the user should be asked to enter a new discount). 2. Display the rainfall for 12 months This option displays the rainfall stored in Array/ArrayList for all 12 months. 3. Display the total rainfall and the average monthly rainfallThis option calculates the total rainfall and the average monthly rainfall. The total is calculated by adding each month’s rainfall and average is calculated by dividing the total rainfall by 12. 4. Display the month with the most rainfall This option displays the month (e.g. February) with the most rainfall. 5. Display the month with the least rainfall This option displays the month (e.g. January) with the least rainfall.
The post understanding of arrays/arraylists, objects, classes, methods, sorting and searching. appeared first on Homework Aider.
What Students Are Saying About Us
.......... Customer ID: 12*** | Rating: ⭐⭐⭐⭐⭐"Honestly, I was afraid to send my paper to you, but you proved you are a trustworthy service. My essay was done in less than a day, and I received a brilliant piece. I didn’t even believe it was my essay at first 🙂 Great job, thank you!"
.......... Customer ID: 11***| Rating: ⭐⭐⭐⭐⭐
"This company is the best there is. They saved me so many times, I cannot even keep count. Now I recommend it to all my friends, and none of them have complained about it. The writers here are excellent."
"Order a custom Paper on Similar Assignment at essayfount.com! No Plagiarism! Enjoy 20% Discount!"
