Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Java Write an application called PastPresentFuture that uses the LocalDate class to access the current date. Task Create the PastPresentFuture class. Prompt a user for

Java image text in transcribed
image text in transcribed
image text in transcribed
Write an application called PastPresentFuture that uses the LocalDate class to access the current date. Task Create the PastPresentFuture class. Prompt a user for a month, day, and year. Display a message that specifies whether the entered date is (1) not this year, (2) in an earlier month this year. (3) in a later month this year, or (4) this month. An example of the program is shown below: Enter a month 7 Enter a day 20 Enter a year (four digits) 2021 7 is this month ter a month 7 iter a day 20 nter a year (four digits) >> 2021 is this month Tasks The program returns the correct response for a date matching the current month. The program returns the correct response for a date in the past. The program returns the correct response for a date in the future. The program returns the correct response for a date not in the current year. Copy the code from your PastPresentFuture program into PastPresentFuture2. Use the Web to learn how to use the LocalDate Boolean methods isBefore() , isAfter() , and equals (). Use your knowledge to write a program that prompts a user for a month, day, and year, and then displays a message specitying whether the entered day is in the past, the current date, or in the future. Tasks Create the PastPresentFuture2 class. The PastPresentFuture2 program implements isBefore(), isAfter(), or equala()

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions