Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program that takes a birthday date (day, month and year) as an input and displays the birthday date if it is a
Write a Java program that takes a birthday date (day, month and year) as an input and displays the birthday date if it is a leap year.
Check for the following condition in your code:
Date is only valid if the number is between 1 and 31
Month is only valid if the number is between 1 and 12
Year has to be a four-digit number
Output:
Enter month: 5
Enter day: 30
Enter year: 2008
5/30/2008 falls on a leap year.
Enter month: 4
Enter day: 32
Enter year: 2008
Invalid entry.
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