Help on assignment, don't understand JOptionPane and showInputDialog
807606Mar 10 2007 — edited Mar 13 2007Hi, I am currently studying java and have problems doing my assignment. here is the assignment question. What I am looking for is pointers and hints to start on my assignment. I am not looking for the source code, rather the way to actually understand it and start writting my code
I believe this assignment wanted me to create a class Object called Zeller with the methods in it and a ZellerTester to test the Object?
I read up on the JOptionPane and the showInputDialog, but don't really quite understand it.
Do i need a constructor for the Object Zeller?
Does my assignment require me to put the showInputDialog as a method in the Zeller class? Or put it in the ZellerTester?
The isLeapYear is a method in the Object Zeller?
Here is the assignment question
Examine the method
showInputDialog() and study its function. Note the return type of this method.
Write a program on the following requirements:
1. Use the JOptionPane facility to ask the user for three positive integers,
representing the day, month and year of a date.
2. Use the Zeller�s congruence formula to find the day of the week.
3. Should include a method boolean isLeapYear(int year)
that will return true if year is a leap year, and false otherwise.
The method should check for leap years as follow:
return true if the year is divisible by 400.
return true if the year is divisible by 4 but not by 100
return false for the remaining values
Thank you.