Question: Can someone help me write a JAVA program that uses arrays that displays a menu with three options? The first option allows the user to
Can someone help me write a JAVA program that uses arrays that displays a menu with three options? The first option allows the user to enter in a month number (between 1-12) and a day number within that month (1-31) and calculates the day number in the year. January 1 is day 1. January 31 is day 31. February 1 is day 32. February 28 is day 59. December 31 is day 365 (don't worry about leap year). If the user enters an invalid combination (like February 31) the program should continuously prompt the user to enter in a new value until they enter a valid date.
The second menu option allows the user to enter in a day number (1-365) and prints out the month name and day number of that month. If the user enters in 59 the program should print out:
Day 59 is February 28
If the user enters an invalid day number the program should continuously prompt the user to enter in a new value until it is in the correct range.
The last menu option allows the user to quit the program. The menu should repeatedly be displayed until the user chooses to quit the program.
- Enter in a month and day
- Enter in a day number
- Quit Enter in a menu option: 1
Enter in a month number: 2 Enter in a day number: 1
February 1 is day 32
- Enter in a month and day
- Enter in a day number
- Quit Enter in a menu option: 2
Enter in a day number: 59 Day 59 is February 28
- Enter in a month and day
- Enter in a day number
- Quit Enter in a menu option: 3
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
