Answer :
Answer:
Following is given the solution to the question. This question has two parts of source code:
- Date class
- Main class
The images are attached displaying code or each class. Indentations are made clear so that the code get easier to understand.
Comments are given inside the code where necessary to make the logic clear.
Output for the code is also attached in the last image.
Explanation:
I hope it will help you!


