Question: For month 4, 6, 9, 11, return 30. For month 2, if it is leap year, return 29, otherwise return 28. A year is a

 For month 4, 6, 9, 11, return 30. For month 2,

For month 4, 6, 9, 11, return 30. For month 2, if it is leap year, return 29, otherwise return 28. A year is a leap year if the year number is a multiple of 4 but not a multiple of 100. However, if a year number is a multiple of 400, the year is a leap year. The following are some sample runs: > run Days OfAMonth > run Days OfAMonth Enter the year: 2000 Enter the year: 2001 Enter the month: 6 Enter the month: 12 6/2000 has 30 days. 12/2001 has 31 days. > run Days OfAMonth Enter the year: 1997 Enter the month: 7 2/1997 has 28 days. > run DaysOfAMonth Enter the year: 2016 Enter the month: 2 2/2016 has 29 days. > run Days OfAMonth Enter the year: 1990 Enter the month: 2 2/1990 has 28 days. > run Days OfAMonth Enter the year: 2000 Enter the month: 2 2/2000 has 29 days. Full Screen v Grading 6 DaysOfAMonth.Java New 1- import java.util.Scanner;||

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!