Hello I asked a question a few hours ago regarding a java co
Hello. I asked a question a few hours ago regarding a java code homework assignment. https://www.chegg.com/homework-help/questions-and-answers/hello-greatly-need-help-java-homework-excercise-using-netbeans-program-class-using-notepad-q18408788. I tried to upload the code my school\'s class website, but it says there is one error. ERROR: The Observation class should have two public methods, but has four. I am not sure how to fix it. Could you assist me please? The code that was given to me is below.
MAIN
OBSERVATION
13 E import java. util. Scanner 14 15 public class Main 16 17 L public static void main (String args 18 19 String date: 20 int wind Speed: 21 int temperature: 22 Scanner sc new Scanner System in) 23 24 System. out println. Enter the observation date:\") 25 26 date 8C.nt extLine 27 System. out println. Enter the wind speed in MPH 28 29 windspeed. SC next Int 30 System. out Enter the temperature in degrees F: 31 temperature 8C.nt extInt 32 33 observation ob new observation (date, windspeed. temperature 34 System out println. Observation date: ob. getDate 35 36 System out println. Wind chill: ob.getwindChill 37 38 L 39 40Solution
Hi, Please find my implementation of Observation class.
Please let me know in case of any issue.
public class Observation {
private String date;
private double windChill;
public Observation(String date, int windspeed, int temperature){
this.date = date;
windChill = 35.74 + 0.6215*temperature -
35.75*Math.pow(windspeed, 0.16)+
0.4275*temperature*Math.pow(windspeed, 0.16);
}
public String getDate(){
return date;
}
public double getWindChill(){
return windChill;
}
}

