Question: Programming Exercise # 0 9 _ 2 : Instruction: 1 . Use Notepad to create new text file named EX 0 9 _ 2 .

Programming Exercise #09_2:
Instruction:
1. Use Notepad to create new text file named EX09_2.java. Enter the following two lines (be sure to replace
YourFullName with your full name):
293
Java Programming Penniel P. Wu, PhD (2024)
// FileName: EX09_2.java
// Programmer: YourFullName
2. Next to the above two lines, write a Java code that uses an input dialog box to ask the user to enter a sentence
that may or may not contain a substring, Ruby.
3. Use the an appropriate Java method (e.g.contains()) to check if the given string contains the word Ruby. If
not, display The substring 'Ruby' is not fund. is a message box. If found, replace every occurrence
of the work Ruby with Java, and then display the revised sentence in a message box.
4. Test the program three times. First, test the program without the Ruby substring. Second, test the program
with one occurrence of the Ruby substring. Third, test the program with two or more occurrences of the
Ruby substring.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!