subject

In the language of an alien race, all words take the form of Blurbs. A blurb is a Whoozit followed by one or more Whatzits. A Whoozit is the character ‘x’ followed by zero or more ‘y’s. A Whatzit is a ‘q’ followed by either a ‘z’ or a ‘d’ followed by a Whoozit.1. Design and implement a program that generates blurbs and asks the user for how many blurbs they would like.2. Design and implement a recursive program that check a given string to be a Blurb or not. The program should repetitively prompt the users for more string to check till the user decide to stop. I already did part one here, but I still need help with part 2.import java. util. Random;import java. util. Scanner;public class BlurbyBlurb //naming corresponds to{// random number generator used by all functionspublic static Random r = new Random(); public static String Blurb(){String result = Whoozit(); // A Blurb is a Whoozitint num = r. nextInt(9) + 1;for (int i = 0; i < num; i++) //followed by one or more Whatzits.{result += Whatzit();}return result;}public static String Whoozit(){String result = "x"; // A Whoozit is the character 'x' ...int num = r. nextInt(9);for (int i = 0; i < num; i++){result += "y"; // followed by zero or more 'y's.}return result;}public static String Whatzit(){String result = "q"; // A Whatzit is a 'q'int num = r. nextInt(2);if (num == 0){result += "z"; // followed by either a 'z' or a 'd',}else // (num == 1){result += "d";}result += Whoozit(); // followed by a Whoozit. return result;}public static void main(String[] args){Scanner scan = new Scanner(System. in); System. out. println("This program makes Blurbs.");System. out. println("How many blurbs do you want?");int n = scan. nextInt();while (n > 0){System. out. println(Blurb());n--;}}}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:30
When creating a presentation in libre office impress, where does the editing of slides take place? a. the slides panel b. the center panel c. the tasks panel, under the masters pages tab d. the tasks panel, under the layouts tab
Answers: 3
question
Computers and Technology, 22.06.2019 21:30
Write a function named printfloatrepresentation(float number) that will print the floating point representation of a number using the format given below. (sign bit) exponent in binary (assumed bit).significandfor example if the number passed an argument is 71 yourprogram should print (0) 10000101 (1).00011100000000000000000similarly if the number passed to the function as argument is -71 the program should print (1) 10000101 (1).00011100000000000000000
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
You know the right answer?
In the language of an alien race, all words take the form of Blurbs. A blurb is a Whoozit followed b...
Questions
question
Biology, 18.11.2020 16:50
question
English, 18.11.2020 16:50
Questions on the website: 13722367