Create a program that performs the following: Overview: Input values from the command line. Calculate the day of year from the inputs. Override Constructors: Use a switch statement based on the number of values input and call the correct constructor. If one value is input it is the year. Then the day and month are defaulted from today's monthday and month.

If two values are input it is the day and month. Then the year is defaulted from the current year. If three values are input, the values would be the month day, month and year. The following page will help you create the defaults in your constructors: http://www.roseindia.net/java/example/java/util/CurrentDate.shtml

Now you will have a class that has the day month and year. From the year, calculate if it is a leap year. That means that your class should have a method to calculate if the year is a leap year. See: http://www.go4expert.com/forums/showthread.php?t=2099 Now you will be able to calculate the number days that the input month, day and year represent. Testing:

January 1 will be day 1.
Feb 28 will always be day 59.
March 1 will be day 60 if it is not a leap year, day 61 if it is a leap year.
December 31 will be day 365 if it is not a leap year, day 366 if it is a leap year.
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.