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
Design an Armstrong indirect FM modulator to generate an FM signal with a carrier frequency 98.1 MHz and a frequency deviation △
Bess [88]

Answer:

See explaination

Explanation:

In the Armstrong method of FM generation, the phase of the carrier is directly modulated in the combing network through summation, generating indirect frequency modulation.

Very high frequency stability is achieved through Armstrong method since the crystal oscillator is used as carrier frequency generator.

Please kindly check attachment for the step by step solution of the given problem.

3 0
4 years ago
I need help with this I dont know the word ​
DiKsa [7]

Would it be Unit?

...............

5 0
3 years ago
Read 2 more answers
How many ticks are in a inch?<br><br><br> A: 12<br> B: 10<br> C: 8<br> D: 16
slamgirl [31]

Answer:

16

Explanation:

since each tick is 1/16 of the inch, there will be 16 ticks

4 0
3 years ago
Suppose there are 76 packets entering a queue at the same time. Each packet is of size 5 MiB. The link transmission rate is 2.1
tia_tia [17]

Answer:

938.7 milliseconds

Explanation:

Since the transmission rate is in bits, we will need to convert the packet size to Bits.

1 bytes = 8 bits

1 MiB = 2^20 bytes = 8 × 2^20 bits

5 MiB = 5 × 8 × 2^20 bits.

The formula for queueing delay of <em>n-th</em> packet is :  (n - 1) × L/R

where L :  packet size = 5 × 8 × 2^20 bits, n: packet number = 48 and R : transmission rate =  2.1 Gbps = 2.1 × 10^9 bits per second.

Therefore queueing delay for 48th packet = ( (48-1) ×5 × 8 × 2^20)/2.1 × 10^9

queueing delay for 48th packet = (47 ×40× 2^20)/2.1 × 10^9

queueing delay for 48th packet = 0.938725181 seconds

queueing delay for 48th packet = 938.725181 milliseconds = 938.7 milliseconds

4 0
3 years ago
What’s another name for wiring diagrams
Diano4ka-milaya [45]

circuit diagram I think
5 0
3 years ago
Read 2 more answers
Other questions:
  • 8. Two 40 ft long wires made of differing materials are supported from the ceiling of a testing laboratory. Wire (1) is made of
    7·1 answer
  • Identify the reattachment point.
    8·1 answer
  • A cylindrical specimen of a hypothetical metal alloy is stressed in compression. If its original and final diameters are 19.636
    7·1 answer
  • While walking across campus one windy day, an engineering student speculates about using an umbrella as a "sail" to propel a bic
    7·1 answer
  • A light bar AD is suspended from a cable BE and supports a 20-kg block at C. The ends A and D of the bar are in contact with fri
    13·1 answer
  • For each of the species below, identify any cyclic conjugated system, then: A. Determine the number of electrons in a system of
    7·1 answer
  • all of the following are steps in the problem solving process except a. try, b. reflect, c. debug, d. define
    11·1 answer
  • Illinois furniture , Inc produces all types of coffee furniture the executive secretary is a chair that has been designed using
    12·1 answer
  • Electronic components are often mounted with good heat conduction paths to a finned aluminum base plate, which is exposed to a s
    14·1 answer
  • Why Elastic Modulus is important and on what it depends?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!