Question: please solve it as soon as solve it in Data Structures by C++ Jordan University of Science and Technology CS211 Data Structures and Algorithms Assianment
please solve it as soon as solve it in Data Structures by C++


Jordan University of Science and Technology CS211 Data Structures and Algorithms Assianment #2 - Stack Prepared by Ghadeer Obiedat First Semester 2020-2021 Section 7 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: m Madam, I'm Adam a d Ph string a m 1 m a d a content stack 2) Pelindrome : 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. Important Notes > You are not allowed to add any other member to the class phrase. > Late assignments will NOT be graded. > Once finished, compress your code and upload it into your elearning account Your assignment must compile in order to be graded. The CPP file should have your name, ID, Section, and a short description about the project Comments should be written all over the program. > Every variable and function should have a comment before it. Cheating is not allowed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
