Im writing a class LeapYearExpert with one static method:
isLeapYear(int year). This methods should return true, if the year given
as a parameter is a leap year and false otherwise.
Does this accomplish that?
Im not sure, if I'm doing it right and I also have to write a tester, but I wanna make sure my class atleast works first.
a tester that reads three years from the user using a scanner and each of these inputs is tested if it is a leap year.
Im unsure of how to call the static method in the tester ... How can I make the tester call on the static method and then tell the user they cant use a number outside of 1900-2299.
Rajesh Nagaraju, you hvae been around for 6½ years and not seen what it says on the beginning forum:
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
All you achieve by giving such an answer is depriving the other person of the chance to learn. Don't be annoyed, but I have pulled rank and deleted the solution.
Joined: Nov 27, 2003
sorry did not realise that I was depriving the poster an opportunity to learn
My sincere apologies
Joined: Oct 13, 2005
Joined: Jul 07, 2010
Ok, so Ive been working on it a bit and Im trying to set it up so if you enter outside of 1900-2299 it errors on you. But as it is it keeps printing everything, it'll check if its a leap year and then it also does the error if you did enter a numder outside the range.