Answered step by step
Verified Expert Solution
Link Copied!

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!

image text in transcribed

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 returns

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transact SQL Cookbook Help For Database Programmers

Authors: Ales Spetic, Jonathan Gennick

1st Edition

1565927567, 978-1565927568

More Books

Students also viewed these Databases questions