C211 Problem Solving and Programming II

C211 I211 Lab 4

Due Date: Monday, September 18, 2023.

In this lab, we are going to solve a problem using the top-down approach and following the problem solving skills highlighted in the lecture.

Ex. 1. Palindrome Problem

Problem Description.   Given a string, determine whether it's a palindrome. A palindrome is a word or phrase that reads the same backwards. Lowercase and uppercase letters are considered the same, and punctuation and spaces can be ignored.

Here are some examples: "civic", "kayak", "mom", "Anna", "Racecar", "Step on no pets", "A man, a plan, a canal, Panama!".

a. Discuss the problem to understand it. Write a plan. Refine the plan. Discuss special cases. Write a pseudo code algorithm for it.

b. Implement the algorithm in Java and debug it. The structure of classes is up to you.

c. Test the code for all the cases you deem necessary to make sure it is correct.

d. Make sure to document all of the above steps. For this, write a Word or plain text document containing the plan, the pseudocode, and a list of test cases with the expected result for each of them.

Lab Submission

Upload the text or work document with the plan and the .java files you created for this project. You can wait until you also finish the homework to upload all the files .java and both text or word documents that you worked on this week.