Given the poem:
Thirty days hath September
April, June, and November
All the rest have thirty-one
with February's 28 to make it fun.
Leap Year happening one in four, Gives February one day more.
How would I write this program using an Enum instead of an array?
1. Prompts the user for a month string (January, February, ...). Validate the input month string against an array of month's, and prompt the user again if the String entered is not a valid month. Note: You may want to use an Enum.
2. Prompts the user for a year (e.g. 2016).
3. For months with 31 days, output the phrase "all the rest have thirty-one". For September, the phrase "Thirty days hath September". For April, June, and November the phrase "April, June, and November". For February, if the year is not a leap year, output the phrase "with February's 28 to make it fun.". If the use did supply a leap year (and the user supplied February as the month), output the phrase "Leap Year happening one in four, Gives February one day more."