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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!