Question: Hello , ineed solution in c++ and use stack ** Predefined function not allowed Palindrome Puzzle Let's try a little puzzle. A palindrome is a

Hello , ineed solution in c++ and use stack

** Predefined function not allowed

Hello , ineed solution in c++ and use stack ** Predefined function

Palindrome Puzzle Let's try a little puzzle. A palindrome is a word, phrase, number or sequence of words that reads the same backwards as forwards. Punctuation and spaces between the words or lettering is allowed. Examples "Madam, I'm Adam" is palindrome "Live not on evil" is palindrome "Hi all hi" is not palindrome The purpose of this exercise is to write a method that checks if a phrase is palindrome or not Define the class with the following members as shown in the bellow UML diagram. phrase ph: string content: Stack + readPharse() : void + ispalindrome (): bool 1) readPhrase : this function prompts the user to enter a sentence and set it to the ph member. Then, push the alphabet character, after converts to lowercase of this sentence to the content member. This means you should ignore any character other than the letters. Example: If the user enters the following sentence: "Madam, I'm Adam", your stack look like: Madam, I'm Adam Ph string a d 1 m a d a content stack 2) i spalindrome: this function checks and returns if the phrase is palindrome or not. YOU CAN'T use array here. You can use any temporary stacks. 3) In the main function, create an object of type phrase and call all its functions. Note: You can use isalpha (char) function to check if the character is letter or not

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!