Question: Day as GUI Write a Java Program using JavaFx . Use a scroll bar for the month and a TextField for the year that must

Day as GUI

Write a Java Program using JavaFx . Use a scroll bar for the month and a TextField for the year that must be filled in if the month is February. Use a read only TextField for the line of the poem that you output.

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 o ne day more.

Write a program that does the following:

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) only if the month is February.

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 o ne day more."

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!