Question by Jason L: Program “JAVA CREATOR” CASE STUDY if you know the problem/codes please answer!?
here’s the problem!
Approximate time is 360 days
exact time is 365 days if a nonleap year and 366 days for leapyear
Case Study 1
Problem requirements:
*Prompts the user to enter two dates with data entry validation.
*Allows users to choose between approximate time and exact time.
*Display the number of days.
Date entry validation rule:
*Counting method must be A for approximate time and E for Exact time only.(Case insensitive)
*Month (MM) must be from 1 to 12 only, Day(DD) should be from 1 to 31 only, and year must be not be a negative value. February must have 28 to 29 days for non leap year and leap year respectively.
*To conform or change date, 1 or 2 only.
*The ending date must always be more recent than the beginning date.
*Display error messages.
General requirements:
#Source codes
here’s the sample output:
Sample output.
Choose counting method(A for approximate time, E for exact time): E
Are you sure? [Y/N]: y
Please enter the beginning date (mm/dd/yyyy):
MM: 02
DD: 12
YYYY: 2008
The first date is: February 12, 2008
Press 1 to confirm date, press to 2 to change date.
[1/2]:1
Date confirm!
Please enter the ending date(mm/dd/yyyy):
MM: 01
DD: 29
YYYY: 2009
The second date is: January 29, 2009
Press 1 to confirm date, press 2 to change date.
[1/2]:1
Date confirm!
Number of days: 352 days exactly.

Best answer:

Answer by navid
man, don’t post the same questions 10 times.

Give your answer to this question below!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.