Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The code skeletons is what is is the screenshots in replit Java EXERCISE LETTERREMOVER Using multiple classes, with a constructor, accessor and modifier methods, complete

image text in transcribedimage text in transcribedimage text in transcribedThe code skeletons is what is is the screenshots in replit

Java

EXERCISE LETTERREMOVER Using multiple classes, with a constructor, accessor and modifier methods, complete the Distance program. You must use the code skeleton provided. Read the lab below and use the code skeleton to complete. Lab Goal: This lab was designed to teach you how to use a while loop. Lab Description : Remove all instances of the specified removal letter from the original sentence. Files Needed: LetterRemoverRunner.java LetterRemover.java Sample Data : I am Sam I am a SSSSSSSSXSSSSesssssssss qwertyqwertyqwerty a abababababab abaababababa x Sample Output : I am Sam I am - letter to remove a I m Sm Im SSSSSSSSXSsssesssssesss - letter to remove s qwertyqwertyqwerty - letter to remove a qwertyqwertyqwerty abababababa - letter to remove b aaaaaa abaababababa - letter to remove x abaababababa O Console Shell Files Open JDK Runtime Environment (build 11.0.6+10-post-Ubuntu-lubuntu 118.04.1) Main.java LetterRemover.java : 0) 29 { 30 cleaned = sentence.substring(indexlet, indexLet+1); 31 indexLet=sentence.indexOf(lookFor); 32 System.out.print(cleaned); 33 } 34 return cleaned; 35 } 36 37 public String toString() 38 { 39 return cleaned + ". letter to remove " + lookFor; 40 } 41 } E ? Console Shell o Files 1 Open JDK Runtime Environment (build 11.0.6+10-post-Ubuntu-lubuntu118 Q X ) 9 Main.java LetterRemover.java 8 9 Main.java X import static java.lang. System.*; 2 3 public class Main 4 { 5 public static void main( string args[] ) 6 { 7 LetterRemover test = new LetterRemover("I am Sam I am", 'a'); out.println(test); out.println(test.removeLetters()+" "); 10 11 test.setRemover("ssssssssssssesssssesss",'s'); 12 out.println(test); 13 out.println(test.removeLetters()+" "); 14 15 test.setRemover("qwertyqwertyqwerty", 'a'); 16 out.println(test); 17 out.println(test.removeLetters()+" "); 18 19 test.setRemover("abababababa", 'b'); 20 out.println(test); 21 out.println(test.removeLetters()+" "); 22 23 test.setRemover("abaababababa",'x'); 24 out.println(test); 25 out.println(test.removeLetters()+" "); 26 } 27 } 0

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

Practical Neo4j

Authors: Gregory Jordan

1st Edition

1484200225, 9781484200223

More Books

Students also viewed these Databases questions