Answer:
public class BlurbGenerator
{
private Random gen
public BlurbGenerator()
{
gen = new Random();
}
public String makeBlurb()
{
return makeWhoozit() + makeMultiWhatzits();
}
private String makeWhoozit(int num)
{
String w = "x"
If (num>0)
{
w += makeWhoozit(num--);
}
return w
}
private String makeYStrings()
{
String yString = "";
if(gen.nextBoolean())
{
yString += 'y' + makeYStrings();
}
return yString;
}
private String makeMultiWhatzit()
{
String whatzits = makeWhatzits();
if(gen.nextBoolean())
{
whatzits += makeMultiWhatzit();
}
return whatzits;
}
private String makeWhatzits()
{
String whatzit = "q";
if(gen.nextBoolean())
{
whatzit = whatzit + "z";
}
else
whatzit = whatzit + "d";
whatzit += makeWhatzits();
return whatzit;
}
public static void main(String[] args)
{
BlurbGenerator blurbgenerator = new BlurbGenerator();
Scanner scanner = new Scanner(System.in);
}
}
Step-by-step explanation: