Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

You have been asked to design a program which takes as input twostrings s1 and s

ID: 3611310 • Letter: Y

Question

You have been asked to design a program which takes as input twostrings s1 and s2 of characters and which returns True is s1 is asustring of s2

Describe a possible program design which is based on the "devideand conquer" principle. You may answer using pseudocode or usingessay type description of the program. It is sufficient to show themain strategy of the program. It is not necessary to write out theprogram in detail.

Now, In order to gain experience in writing programs which handlestrings, u decide to write a program to solve a problem of yourchoice which is simpler than the one descibed at the begining ofthis question but which is related to it. Your program is to havethe following properties:

i) The program takes as input two strings s1 and s2 ofcharacters and returns a Boolean value which is either True orFalse.
ii) If the program returns False for strings s1, s2 then theprogram referred to in part a) will also return False for stringss1 and s2.

Give a pseudocode or essay type description of a design for yourprogram. It is sufficient to show the main strategy of yourprogram. It is not necessary to write out the program indetail.


please give a pseudocode and and essay type description in thiscase.

Thanks

Explanation / Answer

class ContinueWithLabelDemo {     public static void main(String[] args) {         String searchMe = "Lookfor a substring in me";         String substring ="sub";         boolean foundIt =false;         int max =searchMe.length() - substring.length();     test:         for (int i = 0; i
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote