Determine if a string is a Palindrome using a Queue & Stack (Palindrome)
CSCI 162 - Spring 2019

Due: Wednesday, April 3rd at 11:59pm

Score: This lab is worth 25 points towards 100 (Lab 6a was worth 75 points).

Goals
- Update a small, supplied sample application that uses a Queue and a Stack
- Adhere to the required change specification
- Utilize a supplied JUnit test module and make sure your updated program passes all tests

Overview
Your book has the Palindrome.java sample program. Please refer to the Self-Test Exercises for Section 7.2, exercises 7 and 8. Your job is to update the supplied program according to those exercises and the Specification below.

Exercises 7 and 8 are here for your review.

Specification
1. You should start with the Palindrome.java and PalindromeTest.java files as found in ~rogers162/labs/Palindrome. A copy of the Palindrome.java file is here as well.

2. Update Palindrome.java so that it works for strings that are mixed case. Note that exercise 8 indicates that the original program correctly works in detecting mix-case strings as palindromes (for example, "Racecar" would be deemed a palindrome.). Such is NOT the case. Your job is to change the program so that case does not matter, and strings like "Racecar" will be identified as a palindrome just as "racecar" would. Do NOT change the original string (making it all uppercase or all lowercase) to achieve the change. Once you have that working move on to the next exercise.

3. Update Palindrome.java as instructed in exercise 7 so that the program print out an additional line of output that includes the beginning of the string up to the point where it stops being a palindrome.

IMPORTANT: In order to make this work, change the return type of the is_palindrome method from a boolean to an integer and update the method to return -1 (negative 1) if the string *is* a palindrome, else return 0 or greater if not a palindrome with the number returned equal to the index into the string where it is no longer considered a palindrome (again, read Exercise 7 for details if that is confusing).

4. Your program must work and pass all the tests in PalindromeTest.java.

Submit
When you are satisfied that your program works as expected, submit your directory as the Palindrome lab.