Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The goal of this assignment is to reinforce the concept of queue data structure and its applications. To keep all submissions uniform, this assignment uses

image text in transcribed

The goal of this assignment is to reinforce the concept of queue data structure and its applications. To keep all submissions uniform, this assignment uses both stack and queue classes from C++ STL. The assignment asks to design and implement a C++ program (call it testPalindrome.cpp) to test two types of palindromes character-based and word-based. The program provides the user a menu of three options: 1. Test character-by-character palindrome 2. Test word-by-word palindrome 3. Quit program Option 1 is already solved in the textbook, Figure 8.3. Reuse that code as you see fit for this assignment. The solution uses stack and queue objects. Option 2 is the problem described in project #1, page 433. This option tests word-by-word palindromes such that a string of words reads the same forward and backward. Read the problem statement for hints as to how to process word-based palindrome input. In both options, the program asked the user to enter a string and displays the entered string followed by the judgment (Palindrome or Not Palindrome). The output, as shown below. includes the selected option, the entered string, and the program judgment. Implement each option as a separate function in your program, The main program incorporates the menu shown above, similar to previous assignments. The menu is re-displayed after an option is exercised and its output is displayed as shown below. Do Not hard-code test data in the code. Test data is entered using the menu options. Test your code with the following sample inputs and format the output as shown below. You selected: You entered: Judgment: Option 1 Eva, can I see bees in a cave? Palindrome You Selected You entered: Judgment Option 2 You can cage a swallow can't you, but you can't swallow a cage, can you Palindrome You selected: You entered: Judgment: Option 1 Straw? No too stupid a tad. I put soot on warts. Palindrome You selected: You entered: Judgment Option 2 Straw? No too atupid a tad Not Palindrome I put soot on warts

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database Foundations Technology Fundamentals For IT Success

Authors: Bob Bryla

1st Edition

0782143725, 9780782143720

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago