Question: Help me in Java Requirements The features described below must be in your program. A total of eight classes: the driver, WeatherEvent, Precipitation, Obscuration, Rain,

Help me in Java
Requirements
The features described below must be in your program.
A total of eight classes: the driver, WeatherEvent, Precipitation, Obscuration, Rain, Snow, Fog, and Particle.
WeatherEvent class, the superclass of all other classes (except the driver):
o Must be abstract
o Must have 4 fields:
A string called location
A static integer called nextId, initialized at 0
An integer called id
A boolean called active
o It must only feature an overloaded constructor, which assigns location and active
as appropriate, sets id with the value of nextId, and then increments nextId by 1.
o It must have a getter for all fields except nextId
o It must have a setter for location and active
o It must have an override of toString(). This override must be in the following format:
Weather Event Location: {location}
id: {id}
active: {active}
Precipitation class, which is a superclass of Rain and Snow
o Must be abstract
o Must have 1 field: a double called rateOfFall
This field must have a getter and a setter. Do not allow this field to be set
at a value below 0.
This field is keeping track of how fast the Precipitation is happening,
measured in inches/h.
o It must only feature an overloaded constructor which takes in the location, if the
Precipitation is active, and its rate of fall. The rate of fall is set as appropriate, but
the location and activity status must be passed to the super class constructor.
o It must overload the toString() method of its super class to add information to it.
The information added is the Precipitations rateOfFall and, in parenthesis, if the
rate is light, medium or heavy:
Light: less than 0.5 inches/h
Medium: Between 0.5 and 1.5 inches/h (inclusive)
Heavy: Above 1.5 inches/h
Weather Event Location: {location}
id: {id}
active: {active}
Rate of Fall: {rateOfFall} in/h ({Light/Medium/Heavy})
Obscuration class, a superclass of Fog and Particle:
o Must be abstract
o Must have 1 field: an integer called visibility
This field must have a getter and a setter. Do not allow this field to be set
at a value below 0.
This field is keeping track of how far away a person can see through the
Obscuration, measured in eights of a mile.
o It must only feature an overloaded constructor which takes in the location, if the
Obscuration is active, and its visibility. The visibility is set as appropriate, but the
location and activity status must be passed to the super class constructor.
o It must overload the toString() method of its super class to add information to it.
The information added is the Obscurations visibility. If the visibility is at or above
56, the visibility is Normal. Otherwise, the visibility should be displayed in eights
of a mile.
Weather Event Location: {location}
id: {id}
active: {active}
Visibility: {visibility}/8 mi
OR
Weather Event Location: {location}
id: {id}
active: {active}
Visibility: Normal
Rain class
o Must have 1 field: a double called dropSize
This field must have a getter and a setter. Do not allow this field to be set
at a value below 0.02.
This field is keeping track of the diameter of the rain drops, measured in
inches.
o It must only feature an overloaded constructor which takes in the location, if the
Rain is active, its rate of fall, and the diameter of its raindrops. The drop size is set
as appropriate, but the location, activity status, and rate of fall must be passed to
the super class constructor.
o It must overload the toString() method of its super class to add information to it.
The information added is the Rains drop size, as well as their classification. Drop
sizes as classified as:
Small: Less than 0.066 inches
Medium: Between 0.066 and 0.112 inches (inclusive)
Large: Greater than 0.112 inches
Weather Event Location: {location}
id: {id}
active: {active}
Rate of Fall: {rateOfFall} in/h ({Light/Medium/Heavy})
Drop size: {dropSize}({Small/Medium/Large})
Snow class
o Must have 1 field: a double called temperature
This field must have a getter and a setter. Do not allow this field to be set
at a value below -459.67 or above 32.
This field is keeping track of the temperature of the snowfall, measured in
Fahrenheit.
o It must only feature an overloaded constructor which takes in the location, if the
Snow is active, its rate of fall, and the temperature. The temperature is set as
appropriate, but the location, activity status, and rate of fall must be passed to the
super class constructor.
o It must overload the toString() method of its super class to add information to it.
The information added is the temperature.
Weather Event Location: {location}
id: {id}
active: {active}
Rate of Fall: {rateOfFall} in/h ({Light/Medium/Heavy})
Temperature: {temperature} F
Fog class
o Must have 1 field: a boolean called freezingFog
This field must have a getter and a
Help me in Java Requirements The features

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 Programming Questions!