1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
skelet666 [1.2K]
3 years ago
15

Write a method printShampooInstructions(), with int parameter numCycles, and void return type. If numCycles is less than 1, prin

t "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. Example output with input 2: 1: Lather and rinse. 2: Lather and rinse. Done.
Engineering
1 answer:
kirill [66]3 years ago
8 0

Answer:

// The method is defined with a void return type

// It takes a parameter of integer called numCycles

// It is declared static so that it can be called from a static method

public static void printShampooInstructions(int numCycles){

// if numCycles is less than 1, it display "Too few"

   if (numCycles < 1){

       System.out.println("Too few.");

   }

// else if numCycles is less than 1, it display "Too many"

    else if (numCycles > 4){

       System.out.println("Too many.");

   }

// else it uses for loop to print the number of times to display

// Lather and rinse

  else {

       for(int i = 1; i <= numCycles; i++){

           System.out.println(i + ": Lather and rinse.");

       }

       System.out.println("Done");

       

   }

}

Explanation:

The code snippet is written in Java. The method is declared static so that it can be called from another static method. It has a return type of void. It takes an integer as parameter.

It display "Too few" if the passed integer is less than 1. Or it display "Too much" if the passed integer is more than 4. Else it uses for loop to display "Lather and rinse" based on the passed integer.

You might be interested in
PLEASE HURRY!!!
Naily [24]

Answer:

A

Explanation:

He should get a job in engineering to see what it's like to work in the field.

3 0
2 years ago
Read 2 more answers
How will the delay and active power per device change as you increase the doping density of both the N- and the P-MOSFET?
Murljashka [212]

Answer:

hello your question is incomplete attached below is the missing part of the  question

Consider an inverter operating a power supply voltage VDD. Assume that matched condition for this inverter. Make the necessary assumptions to get to an answer for the following questions.

answer : Nd ∝ rt

Explanation:

Determine how the delay and active power per device will change as the doping density of N- and P-MOSFET increases

Pactive ( active power ) = Efs * F

Pactive = \frac{q^2Nd^2*Xn^2}{6Eo} * f

also note that ; Pactive ∝ Nd2 (

tD = K . \frac{Vdd}{(Vdd - Vt )^2}  since K = constant

Hence : Nd ∝ rt

5 0
3 years ago
Identify the phase of the design process illustrated in the following scenario, and justify its importance. Kristin has recently
zaharov [31]

Answer:

The design process is at the verify phase of Design for Six Sigma

Explanation:

In designing for Six Sigma, DFSS, is a product or process design methodology of which the goal is the detailed identification of the customer business needs by using measurements tools such as statistical data, and incorporating the identified need into the created product which in this case is the hydraulic robot Kristin Designed

Implementation of DFSS follows a number of stages that are based on the DMAIC (Define - Measure - Analyze - Improve) projects such as the DMADV which stand for define - measure - analyze - verify

Therefore, since Kristin is currently ensuring that the robot is working correctly and meeting the needs of her client the design process is at the verify phase.

5 0
3 years ago
A renewable item is something that is capable of being replaced naturally.
djverab [1.8K]
The answer is False.
6 0
3 years ago
Read 2 more answers
Which contemporary jazz artist was one of the first to use a synthesizer in their recording
ivolga24 [154]

Answer:

In this era, Sun Ra was among the first of any musicians to make extensive and pioneering use of synthesizers and other various electronic keyboards; he was given a prototype Minimoog by its inventor, Robert Moog.

Explanation:

3 0
2 years ago
Other questions:
  • The roof of a refrigerated truck compartment consists of a layer of foamed urethane insulation (t2 = 21 mm, ki = 0.026 W/m K) be
    14·1 answer
  • The Reynolds number, rhoVD/μ is a very important parameter in fluid mechanics. Determine its value for ethyl alcohol flowing at
    5·1 answer
  • Two routes connect an origin and a destination. Routes 1 and 2 have performance functions t1 = 2 + X1 and t2 = 1 + X2, where the
    6·1 answer
  • In 2009 an explosive eruption covered the island of Hunga Ha'apai in black volcanic ash. What type of succession is this?
    7·1 answer
  • PLLLLLEEESSSEEE IIII NEED ASAP
    12·2 answers
  • The MOST common injury causing absence from work is
    7·2 answers
  • You have a motor such that if you give it 12 Volt, it will eventually reach a steady state speed of 200 rad/s. If it starts from
    10·1 answer
  • thanh thẳng AD có kích thước và chịu lực như hình.biết P1 = 10kn, p2=5kn,M=15kn*m,a=2m.Hãy xách định phản lực liên kết tại A,b
    14·1 answer
  • 2. What is the Function of the Camshaft in an Internal Combustion Engine?
    13·1 answer
  • Accidents occur as a result of ____ and ____.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!