Question: Hello, I would like help answering this Java question. I am suppose to answer using if - else Statements as a beginner. Please explain in
Hello, I would like help answering this Java question. I am suppose to answer using if - else Statements as a beginner. Please explain in detail what you do.
Here is the question:
Write a program that will prompt the user for a date and determine its validity. If the date is invalid, an error message should be displayed explaining precisly where the error is. If the date is valid, the program should compute the day of the year.

Sample run number 1: Please enter a date (mm dd yyyy): 13 1 2001 This date has an error! 13 is an invalid month. Example run number 2: Please enter a date (mm dd yyyy): 3 12 3012 This is 3-12-3012 and is day number 72 of the leap year 3012. Example run number 3: Please enter a date (mm dd yyyy): 2 29 2002 The day 2-29-2002 is invalid. There are only 28 days in February during non-leap years
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
