Purchase Solution

Palindrome Using BufferedReader

Not what you're looking for?

Ask Custom Question

Write a program that reads in strings of characters and determines if each string is a palindrome. Each string appears on a separate input line. Echo-print each string, followed by " Is a palindrome" if the string is a palindrome or "Is not a palindrome" if the stringis not a palindrome. For example, given the input string Able was, I ere I saw Elba. The program should print "Is a palindrome." In detemining whether a string is a palindrome, consider uppercase and lower case letters to be the same and ignore punctuation characters and spares. The input file that you will be reading palindromes from is called "pals.txt". Look for methods like replace (), to lowerCase, to UpperCase,..etc. Write the output ( the string and if is a palindrome) to a file called "palsout.txt". Each line of text in the file pals.txt will contain a palindrome to test for. You can only use the BufferedReader class and not the Scanner class. Please examine the attachment, this is as far as I got, however I am able to compile but when executing I get and error. Please select palindrome files to save in the pals.txt file.

Purchase this Solution

Solution Summary

Palindrome Using BufferedReader is utilized.

Purchase this Solution


Free BrainMass Quizzes
C# variables and classes

This quiz contains questions about C# classes and variables.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.