Question: Write a java class wiht this UML Weather _______________________________________ -temp:Temperature -windspeed: int 0 or greater -winddirection: string all lower case() -humidity: int as a% .
Write a java class wiht this UML
Weather
_______________________________________
-temp:Temperature
-windspeed: int 0 or greater
-winddirection: string all lower case()
-humidity: int as a% . from 0 to 100
_____________________________________________________________
+weather() windspeed to 10 from NW with 20% humidity
+weather(temp:double, scale: char)
+get_Temp():Temperature() returns Temperature
+get_WindSpeed():int returns windspeed
+get_WindDirection():int returns wind direction
+get_Humidity():int returns humidity
+set_Temperature(temp:temperature)
+set_WindSpeed(h:int) only if validation are correct
+set_WindDirection(d:int) only if validation are correct
+equals(stuff:weather):boolean compare the temp and windspeed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
