subject

Write a method named cheerleader that accepts two integer parameters lines and cheers and prints a series of "cheer" lines at increasing levels of indentation. the first parameter represents the number of lines of output to print, and the second represents the number of "cheers" per line. for example, the call of cheerleader(2, 4) means that you should print 2 lines of output, each containing 4 "cheers." a "cheer" is an occurrence of the word "go" in the output. neighboring cheers are separated by the word "team", so 1 cheer is printed as "go", 2 cheers as "go team go", 3 cheers are printed as "go team go team go", and so on. the lines you print should be displayed at increasing levels of indentation. the first line displayed should have no indentation, but each following line should be intended by 3 spaces more than the one before it. in other words, the 2nd line of output should beindented by 3 spaces, the 3rd line by 6 spaces, and so on. you may assume that both parameters passed your method will have values of at least 1.the following calls demonstrate your method's behavior. your method should match this output format exactly: call: cheerleader(2, 1); cheerleader(4, 3); cheerleader(2, 4); output: go gogo team go team go go team go team gogo team go team go
go team go team gogo team go team go team go go team go team go team go
method problem: for this problem, you are supposed to write a java method as described. you should notwrite a complete java class; just write the method(s) described in the problem statement.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Consider the following statements: #include #include class temporary { private: string description; double first; double second; public: temporary(string = "", double = 0.0, double = 0.0); void set(string, double, double); double manipulate(); void get(string& , double& , double& ); void setdescription(string); void setfirst(double); void setsecond(double); }; write the definition of the member function set() so that the instance variables are set according to the parameters. write the definition of the constructor so that it initializes the instance variables using the function set() write the definition of the member function manipulate() that returns a decimal number (double) as follows: if the value of description is "rectangle", it returns first * second if the value of description is "circle" it returns the area of a circle with radius first if the value of description is "cylinder" it returns the volume of a cylinder with radius first and height second. hint: the volume of a cylinder is simply the area of the circle at the base times the height. if the value of description is "sphere" it returns the volume of the sphere with radius first. otherwise it returns -1.0;
Answers: 1
question
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
question
Computers and Technology, 24.06.2019 18:00
Your computer running windows 10 is doing some very strange things with the operating system. you are fairly certain it is not a hardware issue. you need to try to get further insight into what is going on within the operating system. which tool would be best-suited for this?
Answers: 1
question
Computers and Technology, 24.06.2019 18:00
Hacer un algoritmo que me permita ingresar el nombre de una parcela de terreno y muestre junto al mensaje “tipo de suelos: suelos fumíferos, ¡excelente!
Answers: 1
You know the right answer?
Write a method named cheerleader that accepts two integer parameters lines and cheers and prints a s...
Questions
question
Mathematics, 22.06.2019 11:20
question
Spanish, 22.06.2019 11:20
question
Mathematics, 22.06.2019 11:20
question
Mathematics, 22.06.2019 11:20
Questions on the website: 13722363