Question: Programming Exercise # 0 9 _ 2 : Instruction: 1 . Use Notepad to create new text file named EX 0 9 _ 2 .
Programming Exercise #:
Instruction:
Use Notepad to create new text file named EXjava Enter the following two lines be sure to replace
YourFullName with your full name:
Java Programming Penniel P Wu PhD
FileName: EXjava
Programmer: YourFullName
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
Use the an appropriate Java method egcontains 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.
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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
