Computers and Technology

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.

answer
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 20:00, serellehunt
Which type of file can be used to import data into a spreadsheet?
Answers: 1
image
Computers and Technology, 22.06.2019 21:00, briannaleiigh
Kirk found a local community college with a two-year program and he is comparing the cost with that of an out-of-state two-year school. what is the expected total cost for one year at the local community college if kirk lives at home? what is the expected total cost for one year at the out-of-state school if kirk lives on campus?
Answers: 2
image
Computers and Technology, 23.06.2019 11:50, itaheart101
While preforming before operation pmcs, you notice the front right tire appears slightly under-inflated. what is the proper action?
Answers: 3
image
Computers and Technology, 24.06.2019 08:00, Maxxboogie
Can someone work out the answer as it comes up in one of my computer science exams and i don't understand the cryptovariables
Answers: 1
Do you know the correct answer?
Write a method named cheerleader that accepts two integer parameters lines and cheers and prints a s...

Questions in other subjects:

Konu
Mathematics, 04.07.2019 18:00
Konu
Mathematics, 04.07.2019 18:00