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
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