answer.
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]
2 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]2 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
We are undergoing a period of rapid technology change with cloud computing, artificial intelligence, robotics, mobile devices, w
Law Incorporation [45]
2 cause this shot gas
3 0
2 years ago
) A shaft encoder is to be used with a 50 mm radius tracking wheel to monitor linear displacement. If the encoder produces 256 p
andrey2020 [161]

Answer:

number of pulses produced =  162 pulses

Explanation:

give data

radius = 50 mm

encoder produces = 256 pulses per revolution

linear displacement = 200 mm

solution

first we consider here roll shaft encoder on the flat surface without any slipping

we get here now circumference that is

circumference = 2 π r .........1

circumference = 2 × π × 50

circumference = 314.16 mm

so now we get number of pulses produced

number of pulses produced = \frac{linear\ displacement}{circumference} × No of pulses per revolution .................2

number of pulses produced = \frac{200}{314.16} × 256

number of pulses produced =  162 pulses

5 0
2 years ago
Two kilograms of oxygen fills the cylinder of a piston-cylinder assembly. The initial volume and pressure are 2 m3 and 1 bar, re
valentinak56 [21]

Answer: Heat transfer (Q) is 521 kJ.

Explanation: In the piston-cilinder assembly, we can suppose that the oxygen act as an ideal gas, so, it can be used the General Gas Equation:

PV=\frac{m}{M}RT, where:

P is pressure;

V is volume;

m is mass;

M is molar mass;

R is a constant: R = 8.314.10^{-5} m³bar.K⁻¹.mol⁻¹;

T is temperature;

Using this equation, find the intial temperature:

PV = \frac{m}{M}RT

1.2 = \frac{2}{16}.8.314.10^{-5}.T

T = 1.924.10^{5} K

To determine the final temperature, use Combined Gas Law:

\frac{P_{i} . V_{i} }{T_{i} } = \frac{P.V }{T}, in which, the left side of the equality is related to the initial values and the right side, to the final values.

As pressure is constant:

\frac{V_{i} }{T_{i} } =\frac{V}{T}

T = \frac{V.T_{i} }{V_{i} }

T = \frac{4.1.924.10^{-5} }{2}

T = 3.85.10^{5} K

With the temperatures, calculate the heat transfer of the process:

Q = m.k.ΔT, where:

k is heat constant

ΔT = T - T_{i}

Q = m.k.ΔT

Q = 2.1.35.(3.85 - 1.92).10^{5}

Q = 521 kJ

The heat transfer in the process is 521 kJ.

6 0
2 years ago
Read 2 more answers
A liquid with a specific gravity of 2.6 and a viscosity of 2.0 cP flows through a smooth pipe of unknown diameter, resulting in
sasho [114]
.......,.,.,.,.,.,,.,.,,.,.,.,.,.,.,.,,.,.,,.,,,.,,.,,.,.,.,.,,............,,,,,,’mmdjidvdhxxkf jkkk he in d
6 0
2 years ago
A person puts a few apples into the freezer at -15oC to cool them quickly for guests who are about to arrive. Initially, the app
frosja888 [35]

Answer:

Temperature at center of apples = 11.2⁰C

Temperature at surface of apples = 2.7⁰C

Amount of Heat transferred = 17.2kJ

Explanation:

The properties of apple are given as:

k = 0.418 W/m.°C

ρ = 840 kg/m³

Cр = 3.81 kJ/kg.°C

α = 1.3*10 ⁻⁷ m²/s

h = 8 W/m².°C

d = 0.09m

r = 0.045m

t = 1 hour = 3600s

<h2>Solution</h2>

Biot number is given as:

Bi = \frac{hr}{k}= \frac{8\cdot0.045}{0.418}=0.861

The constants λ₁ and A₁ corresponding to Biot number (from the table) are:

λ₁ = 1.476

A₁ = 1.239

Fourier Number is:

T = \frac{a\cdot{t}}{r^2} = \frac{(1.3\cdot10^{-7})(3600)}{0.045^2}= 0.231> 0.2

As Fourier Number > 0.2 , one term approximates solutions are applicable

The temperature at the center of apples, The temperature at surface of apples and Amount of heat transfer is found in the ATTACHMENT.

8 0
2 years ago
Other questions:
  • A rod is 2m long at temperature of 10oC. Find the expansion of the rod, when the temperature is raised to 80oC. If this expansio
    7·1 answer
  • A joining process in which a filler metal is melted and distributed by capillary action between faying surfaces, the base metals
    12·1 answer
  • A subway car leaves station A; it gains speed at the rate of 4 ft/s^2 for of until it has reached and then at the rate 6 then th
    8·1 answer
  • Compute the strain-hardening exponent (n) for an alloy in which a true stress of 415 MPa produces a true strain of 0.10; assume
    10·1 answer
  • A thin-walled tube with a diameter of 6 mm and length of 20 m is used to carry exhaust gas from a smoke stack to the laboratory
    7·1 answer
  • An equation used to evaluate vacuum filtration is Q = ΔpA2 α(VRw + ARf) , Where Q ≐ L3/T is the filtrate volume flow rate, Δp ≐
    13·1 answer
  • 10. A maker of micromechanical systems can reduce product recalls by 10% with the installation of new packaging equipment. If th
    9·1 answer
  • A rectangular beam having b=300 mm and d=575 mm, spans 5.5 m face to face of simple supports. It is reinforced for flexure with
    14·1 answer
  • Select the level of education that is best demonstrated in each example.
    10·2 answers
  • What should always be done before beginning any diagnosis?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!