Question: Develop a Java program that through dialog boxes (JOptionPane) asks the user for the name of the month and the year , the name of
Develop a Java program that through dialog boxes (JOptionPane) asks the user for the name of the month and the year, the name of the month can be entered with uppercase, lowercase or a combination of uppercase and lowercase letters, the user could put spaces before and/or after the name. Then the program should display the number of days in the month. You need to use both: if and switch statements and consider that if the month is February it can have 29 or 28 days if the year is a leap year or not. A year is a leap year if it is a multiple of 4, but not 100 unless it is 400. For example: 1992, 2000, 2004, 2008, 2400 are leap years (Olympics) and 1900, 2100, 2200, 2300 are not leap years .
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
