Description
Question: In this lab you are required to develop a Java program to convert dates from one format to another.
The user will input a string composed of the date formatted as: mm-dd-yyyy . Your code will format the date
to: ddth of month year. Assume a perfect user who will enter the date in the specified format.
Input: Date as string of the format: mm-dd-yyyy
Output: Date formatted as: ddth of month year
The box below illustrates how your program should behave and appear.
REMEMBER in the output: ◦ is a space and ↵ is a new line. Text in green is user input
Enter◦a◦date◦in◦mm-dd-yyyy◦format:↵
12-25-2021↵
Date is: 25th of December 2021↵
Enter◦a◦date◦in◦mm-dd-yyyy◦format:↵
11-01-2018↵
Date is: 1th of November 2018↵
Enter◦a◦date◦in◦mm-dd-yyyy◦format:↵
02-3-1977↵
Date is: 3th of February 1977↵
Reminder:
When submitting your solution to the lab system, make sure that if you have a package statement at the
top of your .java file it is commented out (has // in front of it) as failing to do so will result in a grade of 0
(restriction of the DOMJudge system).