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
The E7018 Electrode produces a/an
julia-pushkina [17]

Answer:

Explanation:

These include the 6010, 6011, 6012, 6013, 7014, 7024 and 7018 electrodes. 6010 electrodes deliver deep penetration and have the ability to “dig” through rust, oil, paint or dirt, making them popular among pipe welders.

7 0
3 years ago
What are the important factors needed to be considered while selecting a brake or clutch?
AysviL [449]

Answer:

The correct answer is: the following factors are needed to properly consider while selecting a brake or clutch:

-Engagement

-Friction

-Electromagnetic

-Mechanical

-Actuation

-Electric

-Fluid power

-Self-actuation

-Key concepts

-Application notes

-Selection criteria

Explanation:

Clutches and brakes are important devices in many rotating drive systems, it is very important to guarantee the security and the proper function of them accomplishing a high quality parameters in those factors.

4 0
3 years ago
Determine the dimensions for W if W = P L^3 / (M V^2) where P is a pressure, L is a length, M is a mass, and V is a velocity.
Eva8 [605]

Correct answer is option E. No dimensions

As we know formula Pressure (P) is \frac{F}{A}

also,

  • Dimensional formula of <em>Pressure is </em>M^{1}L^{-1}T^{-2}
  • Dimensional formula of <em>length is L </em>
  • Dimensional formula of <em>mass is M</em>
  • Dimensional formula  of <em>velocity is </em>L^{1} T^{-1}

So, as given W=\frac{P*L^{3} }{M*V^{2} }

Dimensional formula of W =\frac{M^{1}L^{-1}T^{-2}  L^{3}  }{M^{1} L^{2}T^{-2}   }

since all terms get cancelled

Work is dimensionless i.e no dimensions

Learn more about dimensions here brainly.com/question/20351712

#SPJ10

6 0
2 years ago
A 3-m-high, 11-m-wide rectangular gate is hinged at the top edge at A and is restrained by a fixed ridge at B. Determine the hyd
serg [7]

Answer:

its a

Explanation:

its a

5 0
3 years ago
A solid circular rod that is 600 mm long and 20 mm in diameter is subjected to an axial force of P = 50 kN The elongation of the
Kay [80]

Answer:

a) V = 0.354

b)  G = 25.34 GPA

Explanation:

Solution:

We first determine Modulus of Elasticity and Modulus of rigidity

Elongation of rod ΔL = 1.4 mm

Normal stress, δ = P/A

Where P = Force acting on the cross-section

A = Area of the cross-section

Using Area, A = π/4 · d²

= π/4 · (0.0020)²  = 3.14 × 10⁻⁴m²

δ = 50/3.14 × 10⁻⁴    = 159.155 MPA

E(long) = Δl/l  = 1.4/600 = 2.33 × 10⁻³mm/mm

Modulus of Elasticity Е = δ/ε

= 159.155 × 10⁶/2.33 × 10⁻³    = 68.306 GPA

Also final diameter d(f) = 19.9837 mm

Initial diameter d(i) = 20 mm

Poisson said that V = Е(elasticity)/Е(long)

= -  <u>( 19.9837 - 20 /20)</u>

        2.33 × 10⁻³                  

= 0.354,

∴ v = 0.354

Also G = Е/2. (1+V)

=  68.306 × 10⁹/ 2.(1+ 0.354)

= 25.34 GPA

⇒ G = 25.34 GPA

5 0
3 years ago
Other questions:
  • An FCC iron-carbon alloy initially containing 0.20 wt% C is carburized at an elevated temperature and in an atmosphere wherein t
    6·1 answer
  • or a metal pipe used to pump tomato paste, the overall heat- transfer coefficient based on internal area is 2 W/(m2 K). The insi
    14·1 answer
  • If you are in a tornado situation, which of the following actions would put you in danger?
    11·1 answer
  • A Wii remote flung from a hand through a TV, with a kinetic energy of 1.44J and a mass of 4.5kg. Whats the velocity?
    6·1 answer
  • The production of carbon dioxide makes it unwise and unsafe to operate a tractor or any motor vehicle inside enclosed spaces suc
    13·1 answer
  • Select the correct answer.
    11·1 answer
  • What is photosynthesis​
    9·2 answers
  • Which type of artificial intelligence (ai) can repeatedly perform tasks of limited scope?
    8·1 answer
  • Read the passage.
    9·1 answer
  • A technician is building a high-performance gaming pc. which two items should the technician focus on selecting parts for the ma
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!