1 Please enter a string: Hello world 2 Please enter the substring you wish to find: 1lo 3 Please enter a string to replace the given substring: ee 4. Your new string is: he@@ world

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 2RQ
icon
Related questions
Question

(C#)  to create a program, name it PRGYOURNAMEFA1, that implements a search and replace function recursively. Your program should allow a user to enter a string , a substring to be replaced in the entered string and a character/s to replace the found substring 
Program Structure
A main class that implements the logic of the program – name this class TestSearchReplace
Add a class named SearchReplace to the main class with two methods, including:
SearchSubstring()- return method
ReplaceSubString() - void method

The two method should be called using an object in the main class. DONT CREATE  THE TWO METHODS IN THE MAIN CLASS
Sample Output 

Please enter a string: Hello world
2
Please enter the substring you wish to find: llo
3
Please enter a string to replace the given substring: ee
4.
Your new string is: he@@ world
Transcribed Image Text:Please enter a string: Hello world 2 Please enter the substring you wish to find: llo 3 Please enter a string to replace the given substring: ee 4. Your new string is: he@@ world
Expert Solution
steps

Step by step

Solved in 6 steps with 4 images

Blurred answer
Knowledge Booster
ListBox
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT