Starting from:
$30

$24

Assignment Recursive Descent Parser Solution




Implement a class called SubstringTester that uses recursion to generate all substrings of a given String. For example, the substrings of the string "Sluggo" are the 22 strings:




Sluggo

Slugg

Slug

Slu




Sl

S

luggo




lugg

lug

lu

l




uggo

ugg

ug




u

ggo

gg

g




go

g

o

""




You are not allowed to use any loops to build the substrings -- at least in your final product. You may, however, find it productive to solve the problem using loops first, and then translate to recursive code.







Implement methods in SubstringTester that will interact with the user, acquire a phrase and produce all of the substrings of that phrase. This class should




Get a string from the user (possibly in ‘main’)
Generate and display the substrings of the phrase
CSCD211 – Programming Principles II
 






Repeat the above two steps until the user chooses to quit









Javadoc




Additionally, this assignment requires that you ‘Javadoc’ your source code. That is, your source code must conform to the Javadoc documentation standards. See ‘Course Documents’ for Javadoc examples.










To Turn In




Turn in all source code in a single zip file. Name your zip file as usual. Submit to Canvas.










Note




Hint: You will need either two recursive methods or one recursive method that accepts a ‘flag’ indicating the type of substringing to be performed.




You should not have a great deal of code for this assignment -- think about it -- its recursion :-)

More products