subject

Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, print "Too few.". If more than 4, print "Too many.". Else, print "N: Lather and rinse." numCycles times, where N is the cycle number, followed by "Done.". End with a newline and decare/use loop variable. Example output for numCycles = 2: 1: Lather and rinse.
2: Lather and rinse.
Done.
import java. util. Scanner; 3 public class ShampooBottle 4 5 Your solution goes here / 7 public static void main (String [] args) ShampooBottle trialSize - new ShampooBottle); trialsize. printShampooInstructions (2) 10 Run View your last submission Your solution goes here / public void printShampooInstructions (int numCycles) f if (numCycles 1) System. out. printin("Too few.") else if (numCycles4) System. out. printin("Too many.") else System. out. println("Done."); for (int i = 1; i (z numCycles ; ++i){ System. out . printin (? + ": Lather and rinse.");

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 22:30
You draw two cards from a standard deck of 52 cards, but before you draw the second card, you put the first one back and reshuffle the deck. (a) are the outcomes on the two cards independent? why?
Answers: 3
question
Computers and Technology, 24.06.2019 06:30
Adrawing that places all lines parallel to the z axis at an angle from the horizon is 99 ! a. an oblique drawing b. a perspective drawing c. an auxiliary view d. a one-point perspective drawing
Answers: 2
question
Computers and Technology, 24.06.2019 22:10
How many different ways are there to order the eight jobs in the queue so that job usu comes somewhere before cdp in the queue (although not necessarily immediately before) and cdp comes somewhere before bbd (again, not necessarily immediately before)?
Answers: 1
question
Computers and Technology, 25.06.2019 07:50
Identify an advantage of centralized processing
Answers: 1
You know the right answer?
Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If nu...
Questions
question
English, 04.11.2021 01:00
question
Mathematics, 04.11.2021 01:00
question
Health, 04.11.2021 01:00
question
Mathematics, 04.11.2021 01:00
question
History, 04.11.2021 01:00
Questions on the website: 13722363