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]
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
Wqqwfqwfqwfqfqfqffqwffqwqfqqfqfqffqqfqfwccc
almond37 [142]

Answer:

?

Explanation:

4 0
3 years ago
Read 2 more answers
If a population has no predadors and plenty of available resources, how might that population change
ExtremeBDS [4]

Answer:

B (exponential growth )

Explanation: wish u the best bby <33

4 0
2 years ago
Calculate the availability of a system where the mean time between failures is 900 hours and the mean time to repair is 100 hour
Debora [2.8K]

Answer:

The availability of system will be 0.9

Explanation:

We have given mean time of failure = 900 hours

Mean time [to repair = 100 hour

We have to find availability of system

Availability of system is given by  \frac{mean\time\ of\ failure}{mean\ time\ of\ failure+mean\ time\ to\ repair}

So availability of system =\frac{900}{900+100}=\frac{900}{1000}=0.9

So the availability of system will be 0.9

7 0
3 years ago
Five bolts are used in the connection between the axial member and the support. The ultimate shear strength of the bolts is 320
lesya [120]

Answer:

The minimum allowable bolt diameter required to support an applied load of P = 450 kN is 45.7 milimeters.

Explanation:

The complete statement of this question is "Five bolts are used in the connection between the axial member and the support. The ultimate shear strength of the bolts is 320 MPa, and a factor of safety of 4.2 is required with respect to fracture. Determine the minimum allowable bolt diameter required to support an applied load of P = 450 kN"

Each bolt is subjected to shear forces. In this case, safety factor is the ratio of the ultimate shear strength to maximum allowable shear stress. That is to say:

n = \frac{S_{uts}}{\tau_{max}}

Where:

n - Safety factor, dimensionless.

S_{uts} - Ultimate shear strength, measured in pascals.

\tau_{max} - Maximum allowable shear stress, measured in pascals.

The maximum allowable shear stress is consequently cleared and computed: (n = 4.2, S_{uts} = 320\times 10^{6}\,Pa)

\tau_{max} = \frac{S_{uts}}{n}

\tau_{max} = \frac{320\times 10^{6}\,Pa}{4.2}

\tau_{max} = 76.190\times 10^{6}\,Pa

Since each bolt has a circular cross section area and assuming the shear stress is not distributed uniformly, shear stress is calculated by:

\tau_{max} = \frac{4}{3} \cdot \frac{V}{A}

Where:

\tau_{max} - Maximum allowable shear stress, measured in pascals.

V - Shear force, measured in kilonewtons.

A - Cross section area, measured in square meters.

As connection consist on five bolts, shear force is equal to a fifth of the applied load. That is:

V = \frac{P}{5}

V = \frac{450\,kN}{5}

V = 90\,kN

The minimum allowable cross section area is cleared in the shearing stress equation:

A = \frac{4}{3}\cdot \frac{V}{\tau_{max}}

If V = 90\,kN and \tau_{max} = 76.190\times 10^{3}\,kPa, the minimum allowable cross section area is:

A = \frac{4}{3} \cdot \frac{90\,kN}{76.190\times 10^{3}\,kPa}

A = 1.640\times 10^{-3}\,m^{2}

The minimum allowable cross section area can be determined in terms of minimum allowable bolt diameter by means of this expression:

A = \frac{\pi}{4}\cdot D^{2}

The diameter is now cleared and computed:

D = \sqrt{\frac{4}{\pi}\cdot A}

D =\sqrt{\frac{4}{\pi}\cdot (1.640\times 10^{-3}\,m^{2})

D = 0.0457\,m

D = 45.7\,mm

The minimum allowable bolt diameter required to support an applied load of P = 450 kN is 45.7 milimeters.

5 0
3 years ago
4.68 Steam enters a turbine in a vapor power plant operating at steady state at 560°C, 80 bar, and exits as a saturated vapor at
garik1379 [7]

Answer:

please mark me as a brainleast

Explanation:

hahahahhahaahhahahahahahahahahahahahahahahahaahhhahhhahaahahhaahhhahahaah

3 0
2 years ago
Other questions:
  • What is centrifugal force with respect to unbalance? What is the formula used to determine centrifugal force?
    12·1 answer
  • Technician A says that the first step in diagnosing engine condition is to perform a thorough visual inspection. Technician B sa
    8·1 answer
  • A converging - diverging frictionless nozzle is used to accelerate an airstream emanating from a large chamber. The nozzle has a
    15·2 answers
  • Which field in a Transmission Control Protocol (TCP) header is chosen from ephemeral ports?
    11·1 answer
  • "It is better to be a human being dissatisfied than a pig satisfied; better to be Socrates dissatisfied than a fool satisfied. A
    7·1 answer
  • Which of the following is not necessary a reason to machine a brake drum?
    8·1 answer
  • What engine does chrysler 300c have?​
    15·1 answer
  • The website of a bank that an organization does business with has been reported as untrusted by the organization's web browser.
    12·1 answer
  • I NEED HELP ASAP WILL AWARD BRAINLIEST
    8·2 answers
  • A 240-ton tugboat is moving at 6 ft/s with a slack towing cable attached to a 100-ton barge that is at rest. The cable is being
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!