I haven't gone though your actual logic, to solve your problem.
However ...
When you use if statements always contain the data in curly brackets {}.
While you don't need to by the rules of programming, it always bites you
in the bum if you don't.
I know it can be a pain to curly everything when you don't need to right
now, but if you don't it gets so much harder to find your bugs.
Actualy just a look though, it seems that you are using some sort of
package from Uni that simplifies some actions (import csl.*), so I had
to rework some of it,
Another one of your problems might be this
> boolean isLeap = (year >= 1582);
> if (isLeap == false)
> System.out.println ("It is unknown " + year + " is a leap
> year.");
This is what gives some wierdness with dates before 1582.
Instead of this:
> if (isDivisibleBy4 == true)
> if (isDivisibleBy100 == false)
> if (isDivisibleBy400 == true)
> System.out.println(year + " is a Leap Year.");
try this
if (isDivisibleBy4 && !isDivisibleBy100 && isDivisibleBy400){
System.out.println(year + " is a Leap Year.");
}
I don't normaly give code out to people learning, but you where on the
right track and probably just need to see some examples to allow your
brain to bend around the problem.
I haven't check to see if this works, but I think it does (or at least
it appears to at first glance. Before anybody jumps on my head for not
using StringBuffer ... I know :)
Below works (apparently), give it a go learn from my comments change it
into using the package your course gives you (so you have to use Keyboard).