Question: (JAVA) Write a method that validates whether a date in the format dd/mm/yyyy is valid or invalid. All days must be between 1 and either

(JAVA)

Write a method that validates whether a date in the format dd/mm/yyyy is valid or invalid.

All days must be between 1 and either 30 or 31 (use common sense), unless the month is on February, in which case the day must be between 1 and 28, or 1 and 29 if is a leap year. Months must be between 1 and 12, and year can be any positive integer.

Write a program which prompts the user to enter dates, and then validates these dates using the validate method above. The user can keep entering dates for validation until the user enters "stop". When the user enters "stop", display the validation results.

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!