Question: Please answer in cpp with comments if possible. ty Reflectional Symmetry of Strings [20 points) A string is said to be symmetric if its left
Please answer in cpp with comments if possible. ty

Reflectional Symmetry of Strings [20 points) A string is said to be symmetric if its left and right halves are mirror images of each other. If the string has an odd length, the middle character is cut in half. For example, the character "O" is symmetric because if we cut in in half across the middle, we get two halves that are mirror images of each other. The character "A" is also symmetric because curring the letter A in to a left and a right half, the two halves are mirror images of each other. The characters "G", and "E" are not symmetric. This is not an exhaustive list of all letters of the alphabet but you can see which upper case letters are symmetric and which are not When it comes to strings of length 2, you again cut down the middle and check if the halves are mirror images. So the string "AA" is symmetric, the string "Al" is not. The following strings are all considered symmetric: "II", "25", "55", "3E", "9P", "JL", even though the symmetry is not perfect. Note: This exercise is concerned with upper case letters, and numbers only. No need to include lower case letters, and/or other symbols. More examples: "HELLO" - not symmetric "JOL" - symmetric "E83" - symmetric In your labs.h file, include a function with the following signature: bool symmetric ( std::string ) which returns true if the given string is symmetric and false otherwise. You may use as many helper functions as you want
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
