Question: Hello, i need help solving this problem. I have to Code a JAVA method named season that takes as parameters two integers representing a month
Hello, i need help solving this problem. I have to Code a JAVA method named season that takes as parameters two integers representing a month number and a day number, and returns a String that indicates the season for that month and day.Assume that the
month is specified as an integer between 1 and 12 (1 for January, 2 for February, and so on), and
that the day of the month is a number between 1 and 31.
If the date falls between 12/16 and 3/15, the method should return "winter" .
If the date falls between 3/16 and 6/15, the method should return "spring".
If the date falls between 6/16 and 9/15, the method should return "summer".
And if the date falls between 9/16 and 12/15, the method should return "fall" .
I have to code a JAVA main method that clearly illustrates the program in action.For one additional point of
"extra credit", season should return "impossible" if an illegal date such as 15/3 or 11/31 gets
passed to the method.You can assume that February always has 28 days, since we cannot determine
whether we have a leap year without knowing the year.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
