You will demonstrate your understanding

You will demonstrate your understanding of stacks in this exercise.  Only 1 program is to be completed.  All files require Javadoc documentation comments at the top to include a description of the program, the @file tag, and an @author tag with your name. Class specification files include complete Javadoc documentation comments for all public members. 

AssignmentTutorOnline

Write a method for a class named Palindrome that evaluates a string phrase to determine if the phrase is a palindrome or not. A palindrome is a sequence of characters that reads the same both forward and backward. When comparing the phrase to the same phrase with the characters in reverse order, an uppercase character is considered equivalent to the same character in lowercase, and spaces and punctuation are ignored.

For this assignment, most of the code is completed. Click here to download the files needed for this Lab.  Review the included files.

The main() method uses the overloaded constructor to declare several objects and initialize them to various phrases to test your program for correctness. For each test phrase, the application outputs a message about whether the phrase is a palindrome or not (based on the value returned by evalPalindrome()) the original phrase, and the phrase in reverse order (using the value of reversePhrase changed by evalPalindrome().)

For this lab assignment, implement the evalPalindrome() method, as defined in the Javadoc comments found inside the class definition above. The method you write MUST make use of ArrayStack named letters to reverse the order of the original phrase and to determine if the phrase is a palindrome or not. In other words, the method you write must call the methods in the ArrayStack class to reverse the order of the original phrase and to determine if it is a palindrome. Note that a library named cctype is included in Palindrome.h. This library contains methods like toupper(), tolower(), isalpha(), and ispunct(), which you may find useful.

Only the javadoc comments and evalPalindrome() method should be modified.  No other modifications to the included files should be made.

Delivery Memo:

Each program should be accompanied by a Delivery Memo. The delivery memo is the external documentation (a MS/Word or plain text document) that tells the customer (me) about your program. It should be clearly written, using proper grammar/spelling, and it should be concise. It should include:

  1. A description of the program.
  2. The challenges encountered while analyzing, designing, and writing the program.
  3. How to build the program (exactly what command(s) to run to build the executable, including any options).
  4. How to run the program (exactly what command(s) to run the program, including any options).
  5. How to interact with the program:
    1. How to provide input,
    2. What kinds of input the program accepts, and
    3. How to end/terminate the program cleanly.

Completion:

When you have completed your work, place all files in a compressed folder.  Return to this lab and click the Submit Assignment button at the top of the Canvas page. This will present a File Upload box.  Click the Chose File button to select and upload the compressed folder containing your work.  

To be considered for full credit, the assignment must be submitted no later than midnight (11:59 PM) of the date given.   

Late submissions will be accepted for partial credit up to 2 days after the due date.  

Rubric

Lab 5 (1)

Lab 5 (1)
Criteria Ratings Pts
This criterion is linked to a Learning Outcome
evalPalindrome Method a) evalPalindrome method implemented in Palindrome.cpp b) uses an ArrayStack to reverse the order of the letters in the original phrase c) evalPalindrome returns the original phrase reversed including spaces and punctuation d) evalPalindrome returns a boolean indicator as to whether or not the original phrase is a palindrome e) evalPalindrome produces correct results ignoring spaces and punctuation f) method utilizes effective/efficient program control structures g) effective style used such that method is readable and maintainable
20.0 pts
Total Points: 20.0