Programming Assignment 1

15-212, Spring 1998


This assignment is due before 9am on 18 Feb 1998.
Follow the instruction on the course web page for submitting your solution. Submit one solution per group. It should be in one file called prog1.java, and should include the main class prog1. You should copy just this source file to the location specified in the class web page. Do not carry out your program development in the submission area.
Points will be given for good documentation and style. See the coding style document on the course web page.
See the course web page on collaboration and late submission policies. Make sure your working directory is private and cannot be read by others!

A Palindrome Program:

This assignment is to write a palindrome checker application. (Recall that a palindrome is any string, of 0 or more characters, that looks the same both forwards and backwards.) Your solution should meet the following criteria:


Example:

Here is a list of example input strings, and the expected output from your program:
  Input				Output
  --------------------------	------
  x i nu UNIX			  Y
  palindrome			  N
  01234  dcba			  N
  It was a saw Ti		  Y
  Able I was ere saw I Tulsa      N
  able was I ere I saw Elba	  Y
  abracadabra			  N
  able was I, ere I saw Elba	  Y
(These test strings are also in this text file, for you to test your program. But that in itself is not sufficient; you should run your own tests as well.)