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
A 600-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 54 percent. Determine the rate of hea
Gennadij [26K]

Answer:

\dot Q _{L} = 511.111 MW. Heat transfer can be higher if themal efficiency is lower.

Explanation:

The heat transfer rate to the river water is calculated by this expression:

\dot Q_{L} = \dot Q_{H} - \dot W

\dot Q_{L} = (\frac{1}{\eta_{th}}-1 )\cdot \dot W\\\dot Q_{L} = (\frac{1}{0.54}-1)\cdot (600 MW)\\\dot Q _{L} = 511.111 MW

The actual heat transfer can be higher if the steam power plant reports an thermal efficiency lower than expected.

8 0
4 years ago
The inner surface of a hollow cylinder is subjected to tangential and axial stresses of 40,000 and 24,000 psi, respectively. Det
Furkat [3]

Answer:

15,000 psi

Explanation:

The solution / solving is attach below.

5 0
3 years ago
The ???? − i relationship for an electromagnetic system is given by ???? = 1.2i1/2 g where g is the air-gap length. For current
Artemon [7]

Answer:

a) The mechanical force is -226.2 N

b) Using the coenergy the mechanical force is -226.2 N

Explanation:

a) Energy of the system:

\lambda =\frac{1.2*i^{1/2} }{g} \\i=(\frac{\lambda g}{1.2} )^{2}

\frac{\delta w_{f} }{\delta g} =\frac{g^{2}\lambda ^{3}  }{3*1.2^{2} }

f_{m}=- \frac{\delta w_{f} }{\delta g} =-\frac{g^{2}\lambda ^{3}  }{3*1.2^{2} }

If i = 2A and g = 10 cm

\lambda =\frac{1.2*i^{1/2} }{g} =\frac{1.2*2^{1/2} }{10x10^{-2} } =16.97

f_{m}=-\frac{g^{2}\lambda ^{3}  }{3*1.2^{2} }=-\frac{16.97^{3}*2*0.1 }{3*1.2^{2} } =-226.2N

b) Using the coenergy of the system:

f_{m}=- \frac{\delta w_{f} }{\delta g} =-\frac{1.2*2*i^{3/2}  }{3*g^{2} }=-\frac{1.2*2*2^{3/2} }{3*0.1^{2} } =-226.2N

8 0
3 years ago
It is easy to say that an organization should hire, reward, and dismiss employees based on their character as well as their know
Nata [24]

It is possible to generate a policy in which common points such as those mentioned above are agreed in order to hire or fire employees in their function of their psychological personality, that is, the character of knowledge and skills. Depending on the company, Test could be created in order to evaluate the psychological skills of the employees, as well as Test to periodically determine how their employees are kept up to date with regard to knowledge. The cumulative filter could be done every semester, for which each employee must exceed a minimum margin of score on these tests, otherwise his position could be at risk.

At the same time, incentives can be generated for the best scores that are rewarded not only with monetary values but also with rest days, coupons in restaurants or sports, which would cause the worker to strive to be constantly learning.

This policy agreement is outside the vision and mission of the company, and whose information must be given to the worker once he begins his work activities.

5 0
3 years ago
Is the flow of power reversible in a worm and wheel gear
nikitadnepr [17]

The flow of power cannot be reversed since the slider could not move the worm gears. Since the input has one continuous tooth and the output has not teeth there is no gear ratio and no change in torque and speed.

8 0
3 years ago
Other questions:
  • In , the industries with the most complaints to the Better Business Bureau were banks, cable and satellite television companies,
    13·1 answer
  • Based in bonding theory, explain why heat capacity increases when you consider metals, ceramics and polymers.
    14·1 answer
  • Mr.Haussman has 17 students in his class
    14·2 answers
  • Two parts are to be assembled in a way that if one part fails, the entire assembly fails. Each of the parts have undergone exten
    15·1 answer
  • Which technical planning document defines support tasks?
    7·1 answer
  • View the picture below and then correctly answer the questions using the following words: Temperate Zone, Tropical Zone, Polar Z
    6·2 answers
  • प्रहार का समरूपी भिन्नार्थक शब्द अर्थ के साथ ​
    10·1 answer
  • Jack has been concerned about the rapidly changing green regulations in his state and his ability as a mechanical engineer to ke
    13·1 answer
  • What subject is he......... now? Vietnamese.A. to learnB. learnC. learningD. learned
    10·1 answer
  • Jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
    12·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!