Question: Java Program- Create a class called Forecast. Your Forecast class contains concepts associated with a weather forecast. Forecast does not contain a main method. Forecast

Java Program- Create a class called Forecast. Your Forecast class contains concepts associated with a weather forecast. Forecast does not contain a main method. Forecast should contain the following: an attribute for the temperature a floating point number from -100.0 through 150.0 degrees Fahrenheit if no value or an invalid value is supplied, the default is 72.0 an attribute for the sky condition a string if no value is supplied, the default is clear an attribute for the chance of rain an integer from 0 100 that represents a percentage if no value or an invalid value is supplied, the default is 0% at least two constructors accessors and mutators for all variables methods that convert the temperature: from Fahrenheit to Celsius from Celsius to Fahrenheit from Fahrenheit to Kelvin from Kelvin to Fahrenheit these methods return the converted temperature these methods do not have print/output statements a method that determines whether or not it rains this method returns a boolean this method does not have a print/output statement a print() method that prints useful information about the forecast Write a separate class (with a main method) that tests each of the methods in your Forecast class.

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!