subject

Random Star Write a method named randomStar that takes two parameters, a Random object r and an integer num. The method should keep printing lines of * characters, where each line has between 5 and 19 * characters inclusive, until it prints a line with greater than or equal to num characters. num is guaranteed to be between 5 and 19. For example, the method call randomStar(14) will print:
import java. util.*;
public class RandomStar {
public static void main(String[] args) {
Random r = new Random(2063064142); // ignore the 2063064142
randomStar(r, 12);
System. out. println();
randomStar(r, 19);
}
public static void randomStar(Random r, int num) {
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 15:00
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
question
Computers and Technology, 22.06.2019 15:30
In a compound condition, both conditions on either side of the logical operator and must be true for the overall condition to be true. a: true b: false
Answers: 1
question
Computers and Technology, 22.06.2019 19:20
1)consider the following code snippet: #ifndef book_h#define book_hconst double max_cost = 1000.0; class book{public: book(); book(double new_cost); void set_cost(double new_cost); double get_cost() const; private: double cost; }; double calculate_terms(book bk); #endifwhich of the following is correct? a)the header file is correct as given.b)the definition of max_cost should be removed since header files should not contain constants.c)the definition of book should be removed since header files should not contain class definitions.d)the body of the calculate_terms function should be added to the header file.
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
If i uninstall nba 2k 19 from my ps4 will my career be gone forever?
Answers: 2
You know the right answer?
Random Star Write a method named randomStar that takes two parameters, a Random object r and an int...
Questions
question
History, 27.08.2019 00:10
Questions on the website: 13722367