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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started