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
1. Looking at the case study provided under the Companion Material section, what is the main problem that is addressed in this c
Fiesta28 [93]

Incomplete question. However, I provided information that could assist you in identifying the main problem or issue addressed in any case study.

Explanation:

First, note that a case study is simply a learning aid that allows one to learn from a real-life scenario.

To determine the main problems of a case study one needs to:

  • Read the case as many times as possible to become familiar with the message been expressed. For example,<em> by highlighting or underlining the most important facts </em>it can help you to discover the main problem or issue.
  • Check for any facts provided in the case study, by so doing you can identify the most important problems.

Thus, by taking these few steps you may be able to determine the main problem in that case study.

6 0
3 years ago
List everything wrong with 2020
natita [175]
Everything wrong with 2020 is WW3 that dump trump decided to start , Australia fires , Kobe passed away than Pop smoke :( corona virus got really big , quarantine started , riots & protesting started because of that dumb who’re racist cop ! Hope this helps
6 0
3 years ago
Read 2 more answers
Determine the magnitude of the resultant force and the moment about the origin. Note: the symbol near the 140 N-m moment are not
arlik [135]

Answer:

R = 148.346 N

M₀ = - 237.2792 N-m

Explanation:

Point O is selected as a convenient reference point for the force-couple system which is to represent the given system

We can apply

∑Fx = Rx = - 60N*Cos 45° + 40N + 80*Cos 30° = 66.8556 N

∑Fy = Ry = 60N*Sin 45° + 50N + 80*Sin 30° = 132.4264 N

Then

R = √(Rx²+Ry²)    ⇒  R = √((66.8556 N)²+(132.4264 N)²)

⇒  R = 148.346 N

Now, we obtain the moment about the origin as follows

M₀ = (0 m*40 N)-(7 m*60 N*Sin 45°)+(4 m*60 N*Cos 45°)-(5 m*50 N)+ 140 N-m + (0 m*80 N*Cos 30°) + (0 m*80 N*Sin 30°) = - 237.2792 N-m (clockwise)

We can see the pic shown in order to understand the question.

7 0
3 years ago
A 0.25" diameter A36 steel rivet connects two 1" wide by .25" thick 6061-T6 Al strips in a single lap shear joint. The shear str
just olya [345]

Answer:

Option B

1025 psi

Explanation:

In a single shear, the shear area is \frac {\pi d^{2}}{4}=\frac {\pi 0.25^{2}}{4}

The shear strength=0.58\sigma_y and in this case \sigma_y=36 000 psi

Shear strength=\frac {Load}{Shear area} hence making load the subject then

Load=Shear area X Shear strength

Load=\frac {\pi 0.25^{2}}{4} \times 0.58\times 36000\approx 1025 psi

3 0
3 years ago
A thin 20-cm*20-cm flat plate is pulled at 1m/s horizontally through a 4-mm thick oil layer sandwiched between two stationary pl
leva [86]

Answer:

hindi ko polynomial alam

3 0
2 years ago
Other questions:
  • A ring-shaped seal, made from a viscoelastic material, is used to seal a joint between two rigid pipes. When incorporated in the
    5·1 answer
  • A closed system undergoes an adiabatic process during which the work transfer into the system is 12 kJ. The system then returns
    14·1 answer
  • How does a carburetor work?
    7·1 answer
  • A car engine with a thermal efficiency of 33% drives the air-conditioner unit (a refrigerator) besides powering the car and othe
    15·1 answer
  • Air (ideal gas) is contained in a cylinder/piston assembly at a pressure of 150 kPa and a temperature of 127°C. Assume that the
    12·1 answer
  • What is a build enviroment in construction
    8·1 answer
  • Pls help! 39 points!!
    5·2 answers
  • A flow of 12 m/s passes through a 6 m wide, 2 m deep rectangular channel with a bed slope of 0. 001. If the mean velocity of flo
    12·1 answer
  • Air is compressed in a well insulated compressor from 95 kPa and 27 C to 600 kPa and 277 C. Use the air tables; assume negligibl
    11·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!