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
What is the governing ratio for thin walled cylinders?
Ann [662]

Answer:

The governing ratio for thin walled cylinders is 10 if you use the radius. So if you divide the cylinder´s radius by its thickness and your result is more than 10, then you can use the thin walled cylinder stress formulas, in other words:

  • if \frac{radius}{thickness} >10 then you have a thin walled cylinder

or using the diameter:

  • if \frac{diameter}{thickness} >20 then you have a thin walled cylinder
3 0
3 years ago
The diagram illustrates a method of producing plastics called​
hodyreva [135]

Answer:

polymerisation,

Explanation:

6 0
2 years ago
An inventor claims to have devised a cyclical power engine that operates with a fuel whose temperature is 750 °C and radiates wa
Phantasy [73]

Answer:

Yes

Explanation:

Given Data

Temprature of source=750°c=1023k

Temprature of sink =0°c=273k

Work produced=3.3KW

Heat Rejected=4.4KW

Efficiency of heat engine(η)=\frac{Work produced}{Heat supplied}

and

Heat Supplied {\left (Q_s\right)}=Work Produced(W)+Heat rejected\left ( Q_r \right )

{Q_s}=3.3+4.4=7.7KW

η=\frac{3.3}{7.7}

η=42.85%

Also the maximum efficiency of a heat engine operating between two different Tempratures i.e. Source & Sink

η=1-\frac{T_ {sink}}{T_ {source}}

η=1-\frac{273}{1023}

η=73.31%

Therefore our Engine Efficiency is less than the maximum efficiency hence the given claim is valid.

5 0
3 years ago
Explain the concept of degrees of freedom in terms of physics and mechanics.
Sophie [7]

Explanation:

Step1

Degree of freedom is the number of independent variable which is required to define motion of the system. Degree of freedom is the number of possible motion of the system. Motion can be sliding or rotate. So, there are maximum 6 possible motions of the system, 3 of rotation and 3 of translation. There are 6 maximum possible degrees of freedoms.

Step2

Take an example of slider that is allowed to slide only. So, the slider will have one degree of freedom. Take an example of cylinder which can rotate as well as slide. So, it will have 2 degree of freedom.

6 0
3 years ago
The worst case signal-to-noise ratio at the output of an FM detector occurs when: ________
AlexFokin [52]

Answer:

a. the desired signal is 90 degrees out of phase with the intelligence signal.

Explanation:

The signal to noise ratio of FM detector is defined as function of modulation index for SSB FM signal plus narrow band Gaussian noise at input. The ratio is usually higher than 1:1 which indicates more signals than noise.

6 0
3 years ago
Other questions:
  • Dr. Thermo, only has one bottle of neon. However, he needs to run two experiments, each requiring its own bottle. Therefore, he
    13·1 answer
  • A gasoline engine has a piston/cylinder with 0.1 kg air at 4 MPa, 1527◦C after combustion, and this is expanded in a polytropic
    14·1 answer
  • Initially when 1000.00 mL of water at 10oC are poured into a glass cylinder, the height of the water column is 1000.00 mm. The w
    6·1 answer
  • Although the viscoelastic response of a polymer can be very complex (time-dependent stress cycling for instance), two special lo
    11·1 answer
  • 6.1-2. Diffusion of CO, in a Binary Gas Mixture. The gas CO2 is diffusing at stcady state through a tube 0.20 m long having a di
    7·1 answer
  • This question is 100 points<br> I NEED HELP!!!
    15·2 answers
  • 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
  • Two identical bulbs in parallel in a radio create a total resistance of 15 ohms in the circuit. What's the resistance of each of
    6·1 answer
  • Choose the three questions that an engineer should ask himself or herself when identifying the need of a problem.
    6·2 answers
  • Which of the following was a sustainable power source used during the Middle Ages?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!