A palindromic sentence is a sentence that is spelt the same forwards as backwards, ignoring punctuation and case. For example, 'Madam, I'm Adam' is a palindromic sentence, as is 'Never odd or even'. 'Hello world' is not a palindromic sentence.
Extend your Palindromes class above to include the following method, which tests whether a given sentence is palindromic:
public static boolean isPalindromeSentence(String sentence) throws EmptyStackException, EmptyQueueException;
The methods Character.isAlphabetic() and Character.toLowerCase() could be useful here.
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment