Question: Create your own CustomDate class ( your code may not use the existing Java API Date class ) that can output the date in multiple

Create your own CustomDate class (your code may not use the existing Java API Date class) that can output the date in multiple formats. Your code should throw an exception if the user enters and incorrect format. You can assume that there is not a leap year. Output the date entered by the user in all three of the following formats (use the current date of your code execution as an example):
MM/DD/YYYY (01/26/2021)
Month name, DD, YYYY (January 26,2021)
DDD YYYY (0262021)
Use overloaded constructors to create CustomDate objects initialized with dates of the formats and content enters by the user. There should be a default constructor, the second constructor should receive three integer values, the third a string and two integers, the fourth two integers.
The user should get a menu of options to enter the date in any one of the three formats. Then the program will convert that entry and display all three formats with a well formatted output to the display. If the user enters an incorrect format, an exception should be thrown and handled to allow them to re-enter without ending the program. The program should loop continually until the user is done entering dates and chooses to exit.

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 Programming Questions!