Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Java 4. Write the code of data type class ExerciseMonitor_yourLastName including

ID: 3718991 • Letter: J

Question

Java

4. Write the code of data type class ExerciseMonitor_yourLastName including data members with an double array size 7 to store the distance of 7 days, constructors, and all the following methods Total rainfall for the year The average monthly rainfall The month with the most rain . The month with the less rain The method toString to display the result in the following format: For example if the input from the keyboard for each month as data in the following table: JAN | FEB | MAR? APR? MAY JUN? JUL AUG? SEP OCT| NOVE DEC 3.95 2.53 3.51 8.6916.77 4.05 1.02 0.03 1.039.43 13.57 6.4 The output is: Rainfall in the year: Average monthly rainfall: The month with the most rain The month with the less rain 70.98 5.92 May August

Explanation / Answer

import java.util.Scanner; public class ExerciseMonitor_yourLastName { public static void main(String[] args) { // to store rainfall for 12 months double rainfall[] = new double[12]; String months[] = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; Scanner in = new Scanner(System.in); for(int i=0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote