Question: Write a program called TestMonthHandling that declares two LocalDate objects and prompts the user for values. Display output that demonstrates the dates displayed when one
Write a program called TestMonthHandling that declares two LocalDate objects and prompts the user for values. Display output that demonstrates the dates displayed when one, two, and three months are added to each of the objects.
When you test the program, be sure to try some date late in the month so you can observe what happens when a following month does not have as many days.
An example of the program is shown below:
Enter month >> 1 Enter day >> 1 Enter year >> 2020 Enter month >> 11 Enter day >> 23 Enter year >> 2020 First date 2020-01-01 Second date 2020-02-01 Third date 2020-03-01 Fourth date 2020-04-01 First date 2020-11-23 Second date 2020-12-23 Third date 2021-01-23 Fourth date 2021-02-23
Tasks
Create the TestMonthHandling class.
The TestMonthHandling program adds 1, 2, and 3 months to the user provided date.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
