In C+ Write a method for a class named Palindrome that evaluates a string phrase to determine if the phrase is a palindrome or not. A palindrome is a sequence of characters that reads the same both forward and backward. When comparing the phrase to the same phrase with the characters in reverse order, an uppercase character is considered equivalent to the same character in lowercase, and spaces and punctuation are ignored For this assignment, most of the code is completed. Click here to download the files needed for this Lab. Review the included files. The main) method uses the overloaded constructor to declare several objects and initialize them to various phrases to test your program for correctness. For each test phrase, the application outputs a message about whether the phrase is a palindrome or not (based on the value returned by evalPalindrome0) the original phrase, and the phrase in reverse order (using the value of reversePhrase changed by evalPalindrome0) For this lab assignment, implement the evalPalindrome) method, as defined in the Javadoc comments found inside the class definition above. The method you write MUST make use of ArrayStack named letters to reverse the order of the original phrase and to determine if the phrase is a palindrome or not. In other words, the method you write must call the methods in the ArrayStack class to reverse the order of the original phrase and to determine if it is a palindrome. Note that a library named cctype is included in Palindrome.h. This library contains methods like toupper0, tolower isalpha), and ispunct0, which you may find useful. Only the evalPalindrome) method in Palindrome.cpp needs to be modificd, everything clse is good. Stack Main.epp #include
#include-iostream> include # include #include #include "Palindromeh" using namespace std; void testForPalindrome(string origPhrase); int main (void) const int NUM PHRASES 4 string all PhrasesINUM PHRASES] "kayak" "Read dear" "Madam, I'm Adam" "The End" for (int i-0; i class ArrayStack: public StackInterface hem Type privale: ltemType items[MAX STACK]: int top Amay of stack items W Index to top of stacik ArrayStacko bool isEmpty0 const; bool push(const ItemType& newEntry bool popo ItemType peck) const; N Default constructor Wand ArrayStack include "Array Stack cpp" #endif