For this assignment, you will write a miscellaneous collection of static methods in a class named Hodgepodge. Hodgepodge will also have a main method that puts the other methods through their paces.
Here is a description of the methods you need to write.
A perfect number is an integer that equals the sum of its proper factors. For example, 28 is perfect, because it equals 1 + 2 + 4 + 7 + 14. Write a method with the signature public static boolean isPerfect( int N ) that returns true if N is perfect, and false otherwise.
A palindrome is a word or phrase that reads the same forwards and backwards if you ignore punctuation and spacing. Some of my favorite palindromes are
Nurse, I spy gypsies. Run!
Sit on a potato pan, Otis.
Rats live on no evil star.
Some men interpret nine memos.
Satan, oscillate my metallic sonatas.
Write a method with signature public static boolean isPalindrome( String s ) that returns true if s is a palindrome, and false otherwise.
Write a method with signature public static void animateFish() that instantiates a window and a Fish and then shows the fish swimming back and forth across the window three times (that is, the fish should start at the left and make three round-trips to the right side of the window). Note that this will require you to include a version of your Fish class in your project.
Write a main method to do the following:
You may not change the signatures of the methods described above. If you have the desire to do so, you're organizing your code incorrectly and should either rethink your design or talk to me.
Start early, have fun, and keep in touch.