Whether a string is a palindrome or not

Assignment Help Programming Languages
Reference no: EM13948216

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.

Attachment:- Palindrome Test.doc

Reference no: EM13948216

Questions Cloud

Screw dislocations of opposite sign : 1. Is it possible for two screw dislocations of opposite sign to annihilate each other? Explain your answer. 2. For each of edge, screw, and mixed dislocations, cite the relationship between the direction of the applied shear stress and the directi..
Reid found qualified replacement property which is acquired : Reid found qualified replacement property which is acquired six months later for $390,000. What is the amount of reid's realized gain and recognized gain?
Write an applet file that prompts the user for an id number : Catch the Exception and then display an appropriate message. Save the program as BadIDAndAge.java
Ignoring any minor variations in tense or mood : Part B: Construct an original example, in English in standard form, of each of the following. If it is not possible to do so, say why. Be sure to use premises and conclusions the truth value of which it is reasonable for you to believe that your mark..
Whether a string is a palindrome or not : 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.
Evaluate the top five challenges of conducting quantitative : Evaluate the top five challenges of conducting quantitative and qualitative research and stipulate to strategies to overcome those challenges from the literature on research design theory and practice.
Can you provide an intuitive explanation : Compare the firms' profits under quantity competition and price competition. Can you provide an intuitive explanation for why price competition is more intense (i.e. leads to lower equilibrium profits)?
What might be the challenges faced by your teams : Where might the formation of a team in terms of cellular production benefit your company and/or what "teams" are effective in your company at present? What might be the challenges faced by your teams
Effect on the organizational structure : Assignment: Kudler Fine Foods is in the process of developing a new frequent shopper program. Details of this program are described in the Service Request SR-kf-013 and on the Sales & Marketing page of the Kudler Fine Foods intranet website.

Reviews

Write a Review

Programming Languages Questions & Answers

  Program that computes the average and standard deviation

Write a program that computes the average and standard deviation of a set of double values read from a file.

  Write a c# application that generates a 3-digit random no

Every 10th number you should display a String consisting of a any phrase of your choice concatenated with the current random number.

  Write program to calculate tips for services rendered

Write program to calculate tips for services rendered. The program must request person's occupation, amount of the bill and the percentage tip as input

  Write a perl script code

Write a Perl script which uses the segment of code over and over again, and you are tired of repeatedly typing in this code. Which of the following must you do?

  Program to multiply two integers

What occurs when you multiply two integers whose product is larger than largest int value? Try out example and report your findings.

  Write a program that reads the data from the file

Write a program that - Reads the data from the file into an array of structure when the form is loaded and When "Display Hits" is clicked, based on the team selected from the list, displays the players from that team and their hits. The players are..

  Prepare a vba macro for the bisection method

Prepare a VBA macro for the bisection method and also determine the real roots of the subsequent equation using the written equation: f(x)=-.6x^2+2.4x+5.5

  Create a windows form application in c#

The total price will be the number of computed rental days times the cost for the model of car selected ($19.95/day for Compact, $24.95/day for Standard and $39/day for Luxury).

  Design a logic for a program which allows a user to enter

design a logic for a program that allows a user to enter 15 numbers then display each number and its difference from

  Write a program to transfer copy 400 bytes

Write a program to transfer (copy) 400 bytes from a block starting at $1000 to another block starting at $1500 in Assembly language

  Computes the wind-chill factor for a given temperature

The user should be able to enter a temperature and wind speed via text boxes, then click a button to view the corresponding wind-chill factor in a separate text box. As part of your page, you should define a function named Wi ndChi 11 that accepts..

  Write a program that inputs an integer in the range

Write a program that inputs an integer in the range [-32767, 32767] from the Serial Monitor and checks to see if that number is a prime number. If the number is a prime number, have the LED on pin 13 turn on. If not, then turn the LED off.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd