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
*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.
here’s the 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):
The first date is: February 12, 2008
Press 1 to confirm date, press to 2 to change date.
Please enter the ending date(mm/dd/yyyy):
The second date is: January 29, 2009
Press 1 to confirm date, press 2 to change date.
Number of days: 352 days exactly.
Answer by navid
man, don’t post the same questions 10 times.
Give your answer to this question below!