palindrome Recursion
In Competency Exercises, you demonstrate your skill and ability to use the programming principles you've learned in the current and previous modules. You must complete this assignment by yourself, much like a module exam. You can ask instructors for clarification about the project -- you can not ask instructors or other students for help with logic or coding. If you are struggling with the project, you can look at previous assignments where you did similar work, and you can review the pertinent sections in the book.
You will need to write unit tests to validate the results in this program. Be sure to use at least 5 data sets, and take screenshots of successful results.
Module 1 Competency Project:
Palindrome
A palindrome is a word or phrase that is the same forwards and backwards. For example, "racecar" has the same letters from the left to the right, and from the right to the left. In this project, you will determine if some user input is a palindrome by reversing the input into a new variable, using recursion, and compare the original input variable with the reversed input variable -- if they are the same, the input is a palindrome.
A word palindrome is straightforward, just reverse the string. A phrase palindrome contains spaces -- the spaces are not included when testing for a palindrome. The phrase "was it a rat i saw" is an example of this. It is a palindrome, after you remove all the spaces. When you get the user input, remove spaces from the string. Make all letters lowercase -- an 'X' will not match 'x' when testing if strings are equal. Reverse the string. Compare the variables holding the input phrase and the reversed phrase (no spaces in either) to find out if the input is a palindrome.
Note that the clean phrase, after removing spaces, is displayed, then the reversed phrase below it, for verification. Make sure the colons line up, so the variables line up. Then display the result, that it IS or IS NOT a palindrome. There must be a recursive method to reverse the string and return that reversed string.
Run the project 4 times, with a word that is a palindrome, a word that is not a palindrome, a phrase that is a palindrome, and a phrase that is not a palindrome, and take a screenshot after each execution, like the sample sessions above.
Submission: the specified screenshots (of execution of the program and successful unit tests) and the root folder for the project
Pay careful attention to the rubric for this assignment. Note that you must use correct formatting in the code -- appropriate indentation is most important. You can use Shift-Alt-F to have NetBeans automatically format the code correctly. If the formatting is incorrect, it will be returned to you for changes with a grade of zero. Note: You need to submit the whole project for these assignments. In File Explorer, go to the location where you created the project. There will be a folder with the name of your project -- that is the root folder of the project. If you submit the root folder of the project, the instructor can run it on a different machine to grade it. If you don't submit the proper folder, it won't run on another machine, and the assignment will be marked with a zero.
== We're Using GitHub Under Protest ==
This project is currently hosted on GitHub. This is not ideal; GitHub is a proprietary, trade-secret system that is not Free and Open Souce Software (FOSS). We are deeply concerned about using a proprietary system like GitHub to develop our FOSS project. I have a website where the project contributors are actively discussing how we can move away from GitHub in the long term. We urge you to read about the Give up GitHub campaign from the Software Freedom Conservancy to understand some of the reasons why GitHub is not a good place to host FOSS projects.
If you are a contributor who personally has already quit using GitHub, please email me for how to send us contributions without using GitHub directly.
Any use of this project's code by GitHub Copilot, past or present, is done without our permission. We do not consent to GitHub's use of this project's code in Copilot.