Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

must be done with java. It is an introductory class to java please make it as simple as possible Mrite a public class call FunnyWord

must be done with java. It is an introductory class to java please make it as simple as possible

image text in transcribed

Mrite a public class call FunnyWord class FunnyWord must have a main method what it does: 8. prompt user for a String 1. read a String from the user 2. print whether the String is funny or not 3. continue until user enters the word "end" The String is funny if it looks the same read from left to right or right to left In order to pass all tests you must find funny phrases when spaces, punctuation and case are ignored (look at the examples). HINT: you could use the nethod replaceAll from String in order to delete all the punctuation marks For example: str.replaceAll("; ", ""); returns a string where all senicolons have been replaced by nothing Notice: you cannot use any method called "reverse". That is considered forbidden knowledge Examples java FunnyWord Enter a String: Anna funny! funny! funny! Enter a String: AnnA AnnA Enter a String: A man, a plan, a canal: Panama Enter a String: foo that is not funny Enter a String: Annax that is not funny Enter a String: end that is not funny

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases A Beginners Guide

Authors: Andy Oppel

1st Edition

007160846X, 978-0071608466

More Books

Students also viewed these Databases questions

Question

Outline the regulatory framework for workplace health and safety

Answered: 1 week ago