Question: Create a java program ( Homework5.java ) to prompt the user to enter a month as an integer between 1 and 12, a day of

Create a java program (Homework5.java) to prompt the user to enter a month as an integer between 1 and 12, a day of the month as integer between 1 and a maximum determined by the month, and year as a 4 digit integer.

Create separate input methods for each requested input - specifically inputMonth, inputDay, inputYear - and return the value entered. Include appropriate conditionals to validate user input before returning the value.

Create two methods, printAmerican and printEuropean, to generate formatted output based on the user input. Both methods should have three parameters for the date values.

Output for printAmerican(7,22,2019): July 22, 2019

Output for printEuropean(7,22,2019): 22 July 2019

Use some type of flag value to indicate to main when input is not valid, and check that flag value to prevent printAmerican and printEuropean from running if the user doesn't give valid input. Examples of flag values are contained in the conditionals decks and class assignments.

Include Javadoc comments for each of the methods created. You do not need to generate the Javadoc.

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!