CECS 282
LAB ASSIGNMENT 4
Assigned date: 2/16
Due date: 2/23
10 points
Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same backward as forward. Blank, punctuation marks and capitalization do not count in determining palindromes. Here is some examples of palindromes:
Radar
Too hot to hoot
Madam!I'm adam
A man, A plan, A canal-Panama
Doc, note, I dissent! A fast never prevents a fatness; I diet on cod
Requirements:
- void transform( char *raw, char *testStr);
The function transform converts the given string raw into a standard form by coverting lowercase letters into uppercase letter and removing all characters other than letters and numerals from the string. The converted string will stored in C string testStr.
- bool testPalindrome(char *str);
The function test checks whether the C string str is a palindrome. If the C string str is palindrome, then the function returns true; otherwise, the function returns false.
GRADING
- Inside the program, put your name at the beginning of your program
//YOUR NAME
// CECS 282 LAB 4
- Return a hard copy of the lab assignment
- Demonstrate the lab assignment in the lab
- Grade based on the successful execution of the program and the coding efficiency.