Hi, my name is Eliot and I am taking JAVA class and I am having hard time doing one of the projects,
The project is :
A program that accepts a date D (say 3/27/1995) and a number N of days (say 50), then prints the dates that are N days backward from D and N days forward from D:
Exp: 50 days forward from Monday the 27th of March 1995 is Tuesday the 16th of May 1995
50 days back from Monday the 27th of March 1995 is Sunday the 5th of February 1995
also we have to write a method int GetValue (String S, int LoBound, int HiBound) to ask the user (using S as the prompt message) for a value. Trap the value if it is not in range, and then return it. If the program asks for year, then month, then day, the program calls can be
year = GetValue (“year”, 1700 , 2200);
month = GetValue (“month”, 1, 12);
day = GetValue (“day of month”, 1 , DaysInMonth (year, month));
the first assignment statement would first issue the prompt:
Please enter year between 1700 and 2200:
And would then accept an integer in the range 1700 and 2200.
I would really appreciate it if you could help me on this.
Thanks