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
kifflom [539]
3 years ago
14

Run the program and observe the output to be: 55 4 250 19. Modify the numsInsert function to insert each item in sorted order. T

he new program should output: 4 19 55 250
Engineering
1 answer:
baherus [9]3 years ago
4 0

Answer:

The original program is as posted by the user at brainly.com/question/14102353

//Using Java

import java.util.ArrayList;

import java.util.Scanner;

public class PlayerManager {

    // Declaration

    public static void addPlayer (ArrayList<Integer> players,

int playerNum) {

     int i = 0;

     boolean foundHigher = false;

     foundHigher = false;

     i = 0;

     while ( (!foundHigher) && (i < players.size()) ) {

        if (players.get(i) > playerNum) {

   

       players.add(i, playerNum);

       

           foundHigher = true;

        }

        ++i;

     }

 

     if (foundHigher == false) {          

players.add(new Integer(playerNum));

     }

     return;

  }

  // Prints player numbers currently in ArrayList

  public static void printPlayers(ArrayList<Integer> players) {

     int i = 0;

     for (i = 0; i < players.size(); ++i) {

        System.out.println(" " + players.get(i));

     }

     return;

  }

  // Maintains ArrayList of player numbers

  public static void main (String [] args) {

     ArrayList<Integer> players = new ArrayList<Integer>();

   

     addPlayer(players, 55);

     addPlayer(players, 4);

     addPlayer(players, 50);

     addPlayer(players, 19);

   

     printPlayers(players);

     return;

//end of the program

  }

}

You might be interested in
Two parallel surfaces move in opposite directions relative to each other at a velocity of 64 in/sec and are separated by a gap o
Illusion [34]

Answer:

\mu = 2.6906 × 10^{-3} lb-s/in²

Explanation:

given data

velocity V = 64 in/sec

separated by a gap x = 0.41 in

relative motion by shear stress \tau  = 0.42 lb/in²

solution

we know that shear stress is directly proportional to rate of change of velocity  as per newton's law of viscosity.

\tau = \mu \times \frac{du}{dy}      ....................1

so here \mu coefficient of dynamic viscosity and \frac{du}{dy} is velocity gradient

and

\tau = \mu \times \frac{v1 - v2 }{h2-h0}  

put here value and we get

0.42 =  \mu \times \frac{64}{0.41}

\mu = 2.6906 × 10^{-3} lb-s/in²

4 0
3 years ago
What parts are needed to complete a loop for an LED?
nika2105 [10]

Answer:

it depends on what LED's your using... if you have one long strip of them you cant make a loop unless you want it to be bent

Explanation:

3 0
3 years ago
Read 2 more answers
What is meant by the thickness to chord ratio of an aerofoil?
Karolina [17]

Answer:

Chord ratio:

  It is the ratio of thickness to the chord.It is also knows as thickness ratio.

Chord ratio measure the performance of wing when it is operating at the transonic speed.

When the speed cross the speed of sound wave then that wave creates the shock wave and these shock leads to produce drag force on the aerofoil profile.When Mach number is one then it means that if Mach increase then it will leads increase then drag force.

6 0
3 years ago
Circulates air through the engine to keep engine components cool​
Katena32 [7]

Answer:radiator

Explanation:

7 0
3 years ago
What are the systems used to step down energy so that it can safely be delivered to a home or other building for use?.
nekit [7.7K]

Systems such as dams and power plants use turbines and generators to generate electricity along with any other components, which then transfer the energy to our power grid which uses an enormous system of wires used to step down energy so that it can safely be delivered to a home or other building for use.

<h3>What are power plant?</h3>

A power station , also called a power plant and sometimes a power plant , is an industrial facility for the production of electricity. Power plants are usually connected to the power grid.

In case of electrical demand, water is let in from the  elevated tank into the lower tank. It produces electricity as it flows through a turbine, which produces motion and electricity. Thermal power plants produce electricity by converting heat into electricity, mainly through combustion.

To learn more about power plant, refer;

brainly.com/question/7670779

#SPJ4

6 0
2 years ago
Other questions:
  • The pressure and temperature at the beginning of compression of a cold air-standard Diesel cycle are 100 kPa and 300K, respectiv
    6·1 answer
  • Smoke rises from a chimney on a day with variable winds and produces a visible pattern. Does this pattern represent a pathline o
    14·1 answer
  • Roentgens are used to measure the amount of:
    6·1 answer
  • How do I put a picture on here for my graph equation??
    10·2 answers
  • A circular ceramic plate that can be modeled as a blackbody is being heated by an electrical heater. The plate is 30 cm in diame
    15·1 answer
  • Question 7 options: A steel tape that has a length of 100.00 at 68 degrees F is to be used to lay off a building with the dimens
    6·1 answer
  • a person who agrees to purchase the finished products or services presented with the prescribed or correct features​
    5·1 answer
  • Inductors in series obey the same formula as resistors in series. That is, if you connect two inductors are in series, the equiv
    12·1 answer
  • An o ring intended for use in a hydraulic system using MIL-H-5606 (mineral base) fluid will be marked with
    14·1 answer
  • When driving we use what type of vision
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!