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
For the unity negative feedback system G(s) = K(s+6)/ (s + 1)(s + 2)(s + 5) It's known that the system is operating with a domin
Ad libitum [116K]

Answer:The awnser is 5

Explanation:Just divide all of it

4 0
3 years ago
2. What is the Function of the Camshaft in an Internal Combustion Engine?
mamaluj [8]

Answer:

camshaft, in internal-combustion engines, rotating shaft with attached disks of irregular shape (the cams), which actuate the intake and exhaust valves of the cylinders.

Explanation:

I'm taking an engineering/tech class. I hope this helps! :)

8 0
3 years ago
All air-conditioning units must be grounded electrically to
Tpy6a [65]

Answer:

Prevent electrical shock

Grounding is a non current carrying conductor mainly used to guard against hazards due to leakage in electric circuits

Explanation:

The grounding refers to the connection of an electrical equipment exposed metallic parts to the ground to serve as a source of current flow in the event of an insulation failure will cause the fuses to trip thereby isolating or removing electric power from the device

Grounding also prevents the accumulation of static electricity which can be a source of fire in inflammable areas.

8 0
3 years ago
For this problem, calculate the following by hand and show the procedure for how you obtained the results. Subsequently, solve p
Gemiola [76]

Answer:wat

Explanation:

4 0
3 years ago
A world class runner can run long distances at a pace of 15 km/hour. That runner expends 800 kilocalories of energy per hour. a)
maks197457 [2]

Answer: a) 1.05kW b) 3.78MJ c) 5.3 bars

Explanation :

A)

Conversions give 900 kcal as 900000 x 4.2 J/cal {4.2 J/cal is the standard factor}

= 3780kJ

And 1 hour = 3600s

Therefore, Power in watts = 3780/3600 = 1.05kW = 1050W

B)

At 15km/hour a 15km run takes 1 hour.

1 hour is 3600s and the runner burns 1050 joule per second.

Energy used in 1 hour = 3600 x 1050 J/s

= 3780000 J or 3.78MJ

C)

1 mile = 1.61km so 13.1 mile is 13.1 x 1.61 = 21.1km

15km needs 3.78 MJ of energy therefore 21.1km needs 3.78 x 21.1/15 = 5.32MJ =5320 kJ

Finally,

1 Milky Way = 240000 calories = 4.2 x 240000 J = 1008000J or 1008kJ

This means that the runner needs 5320/1008 = 5.3 bars

7 0
3 years ago
Other questions:
  • A composite wall consists of 20 mm thick steel plate backed by insulation brick (k = 0.39 W/mK) of 50 cm thickness and overlaid
    6·1 answer
  • Interlocking stacked material is done by​ _____.
    10·2 answers
  • An incompressible fluid flows along a 0.20-m-diameter pipe with a uniform velocity of 3 m/s. If the pressure drop between the up
    15·1 answer
  • A 230 V shunt motor has a nominal armature current of 60 A. If the armature resistance is 0.15 ohm, calculate the following: a.
    5·1 answer
  • True or false <br> 19. Closed systems rely on feedback from outside of the system to operate.
    12·1 answer
  • The stagnation chamber of a wind tunnel is connected to a high-pressure airbottle farm which is outside the laboratory building.
    11·1 answer
  • Describe two fundamental reasons why flexural strength should depend on porosity
    14·1 answer
  • Describe two other safe driver skills a driver should use when driving in this road condition
    7·1 answer
  • For installations where the nonlinear load is huge, most consulting engineers will specify ____-rated transformers.
    8·1 answer
  • 3. If nothing can ever be at absolute zero, why does the concept exist?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!