Modify both LeapYearApplet and LeapYearGUIPanel so they interface with the LeapYear class. Here are a list of required changes:
One new thing this week is that you have to convert the String that you input from the text field into an int. Use the following code. For example, if str is storing "2004", the following expression will convert it to the int value 2004:
Integer.parseInt(str)
Why do we follow this design for the LeapYear class? The reason is that we only need to define one method, isLeapYear(), which takes an int parameter, representing the year, and returns a boolean that represents whether the year is a leap year. The only information needed by this method is the year itself. So this class doesn't need instance variables. However, to be able to use the isLeapYear() method from the GUI, we will have to declare it public static. Then we will be able to reference it as follows:
... LeapYear.isLeapYear(2000) ...
... LeapYear.isLeapYear(aYear) ...
N % 2 == 0
Before handing in your programs, be sure to document your source code.
Have your work checked by the laboratory instructor or TA. Print out and hand in a copy of your ScrambleGUIPanel.java.