Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE COMPLETE ALL EXERCISES!!!! AND CLEARLY, LABEL WHICH CODE BELONGS TO WHICH EXERCISE 1.Exercise 4.3.6 2.Exercise 4.3.7 3.Exercise 4.3.8 4.Exercise 4.3.9 5.Exercise 4.3.10 The following

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

image text in transcribed

PLEASE COMPLETE ALL EXERCISES!!!! AND CLEARLY, LABEL WHICH CODE BELONGS TO WHICH EXERCISE

1.Exercise 4.3.6

2.Exercise 4.3.7

3.Exercise 4.3.8

4.Exercise 4.3.9

5.Exercise 4.3.10

The following assignments are incomplete java codes that should match the assignment instructions given on the right-hand side, please make sure the Java code you post is correct and answers the assignment instructions given.

O 4.3.6: Replace Letter Save Submit + Continue RUN CODE | TEST CASES ASSIGNMENT DOCS | GRADE MORE 5 points Status: Not Submitted A programmer has written a method called replaceLetter that counts the amount of times a letter is present in a word. Your job is to modify this existing method to fulfill a new purpose. Rather than count the instances of a letter in a String, write a program that replaces all instance of one letter with another. You should directly modify replaceLetter to get this program to work. In the starter code, replaceLetter only has two parameter values. Your new version should have a third parameter to indicate which String value is replacing the existing letter 1 public class Letter 2- { 3 public static void main(String[] args) 4 { 5 // Ask the user for 3 things: their word, letter they want to replace, 6 // and replacing letter. 7 // Call the method replaceLetter and pass all 3 of these items to it for 9 // string processing. 10 } 11 12 // Modify this method so that it will take a third parameter from a user that is the String they want to 13 //to replace letterToReplace with. This method should return the modified String. 14 public static int replaceLetter(String word, String letterToReplace) { 16 17 int count 0; 18 for(int i 0; i

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

More Books

Students also viewed these Databases questions

Question

Apply your own composing style to personalize your messages.

Answered: 1 week ago

Question

Format memos and e-mail properly.

Answered: 1 week ago