Answered step by step
Verified Expert Solution
Question
1 Approved Answer
In JAVA please!!!!! Thank you so much! Based on the driver/test class below (WeeklyWeatherDataDriver.java) create a class called WeeklyWeatherData. Keep in mind the purpose of
In JAVA please!!!!! Thank you so much!
Based on the driver/test class below (WeeklyWeatherDataDriver.java) create a class called WeeklyWeatherData. Keep in mind the purpose of this assignment is to get you to think about Encapsulation... be sure to follow what was discussed in class and in the notes. It should fields that are NOT accessible in the driver. Let the fields be: o double[] rainfall o double[] pressure o double avgRain double maxRain should be highest day in the week O double avgPressure o double maxPressure should be highest day in the week . Program the class so that it has all the appropriate methods. o The only getters should be for avgRain, maxRain, avgPressure, and maxPressure. o The only setter should be setData() which sets both rainfall[] and pressure[] fields both at the same time. o calculateStats() should calculate avgRain, maxRain, avg Pressure, maxPressure all at once in the method. No returnsStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started