isPalindrome |
Modify the Unit 3 Word class project by adding a predicate method named isPalindrome to the Word class. The isPalindrome method must not accept any parameters but must return a boolean true if the property of the Word class is a palindrome and a false if it is not a palindrome. Modify the client program (i.e. WordTest) so that it tests the isPalindrome method. The test class must display the phrase "palindrome" or "not palindrome" depending on whether isPalindrome returns a true or false. Do not use loops in this program. Your program must follow the class Coding Standards. Preconditions:
You must hand in the following on separate pages stapled in this specified order:
|