Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
7 views2 pages

String Finder

The document outlines a programming task to create a method that checks if one string (Str2) appears after another string (Str1) within a given search string (SearchString). It specifies the structure of the classes and methods needed, including input and output formats. The expected output is a simple 'yes' or 'no' based on the condition specified.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views2 pages

String Finder

The document outlines a programming task to create a method that checks if one string (Str2) appears after another string (Str1) within a given search string (SearchString). It specifies the structure of the classes and methods needed, including input and output formats. The expected output is a simple 'yes' or 'no' based on the condition specified.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

String Finder

Grade settings: Maximum grade: 100


Disable external file upload, paste and drop external content: Yes
Based on: String Finder
Run: Yes Evaluate: Yes
Automatic grade: Yes
Given three strings say Searchstring, Str1 and Str2 as input, write a program to find
out if Str2 comes after Str1 in the Searchstring.

Include a class UserMainCode with a static method "stringFinder" that accepts 3


String arguments and returns an integer. The 3 arguments correspond to
SearchString, Str1 and Str2. The function returns 1 if Str2 appears after Str1 in the
Searchtring. Else it returns 2.

Create a class Main which would get 3 Strings as input and call the static
method stringFinder present in the UserMainCode.

Input and Output Format:

Input consists of 3 strings.

The first input corresponds to the SearchString.

The second input corresponds to Str1.

The third input corresponds to Str2.

Output consists of a string that is either "yes" or "no"

Sample Input 1:

geniousRajKumarDev

Raj

Dev

Sample Output 1:

yes

Sample Input 2:

geniousRajKumarDev
Dev

Raj

Sample Output 2:

no

You might also like