Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1) A palindrome is a number or a text phrase that reads the same backward as forward. For example, 12321, 55555, 45054. a) Write a
1) A palindrome is a number or a text phrase that reads the same backward as forward. For example, 12321, 55555, 45054.
a) Write a base class CharPalin that reads in an array of n chars and determine whether it's a palindrome.
b) Write a derived class StrPalin which inherits from the base class in a), and overwrite the function which checks for palindrome. In this case we want to check for text string palindrome. This means a sentence like Tracy, no panic in a pony-cart. is also a palindrome.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started