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
Bezzdna [24]
3 years ago
6

Exercises: Solve the following problems on paper and bring your sheet of paper to your section on Thursday: Consider the followi

ng method: public static void arrayMystery(int[] array) { for (int i = 0; i < array.length - 1; i++) { if (array[i] < array[i + 1]) { array[i] = array[i + 1]; } } } Indicate what values would be stored in the array after the method arrayMystery executes if each integer array below is passed as a parameter to it. a. input = {2, 4} b. input = {1, 3, 6} c. input = {7, 2, 8, 4} d. input = {5, 2, 7, 2, 4} e. input = {2, 4, 6, 3, 7, 9}
Computers and Technology
1 answer:
Volgvan3 years ago
4 0

Answer:

Hi Lzvcorri! Based on the inputs, we can expect the answers:

a. [4, 4]

b. [3, 6, 6]

c. [7, 8, 8, 4]

d. [5, 7, 7, 4, 4]

e. [4, 6, 6, 7, 9, 9]

Explanation:

For a, the input is {2,4} so the array length is 2, and the loop will run for array.length - 1. So the first run with this array will see if array[i] (i=0 as initially set in the for loop with the statement "for (i=0;)") is less than the value in the array after it, array[i+1]. Since 2, is less than 4, it will assign the value of 4 in the first array index as per this condition being met (array[i] = array[i + 1];). Similarly, if you trace the execution of the program with the remaining inputs b, c, d, and e, you should expect the resultant array as in the answer above.

You might be interested in
A smart refrigerator can use what to detect when you are running low on milk, and then send a reminder to you on a wireless.
Olegator [25]

Answer:

RFID scanning or Barcode reader

Explanation

Smart refrigerators have inbuilt RFID scanning technology that help monitor the stock that is inside your fridge. Once you pass your items through the inbuilt RFID scanner in the fridge, the barcode of your items is cross-referenced with a database and given a unique tag for identification. This technology helps detect and track the stock that is inside your fridge and when you start running low, the RFID can be triggered to send a reminder as a notification on your email or a text message.

3 0
3 years ago
Jim wants to develop an app for a specific purpose that would run even when his computer is not connected to the Internet. What
Vadim26 [7]

Answer:

NOT mobile app. NOT Cloud-based app.

Explanation:

4 0
3 years ago
There are four types of characteristics attributed to a flow: reliability, delay, jitter, and bandwidth. Explain how each of the
sergeinik [125]

Answer and Explanation:

Reliability is important because if the service lacks  lacks reliability this could mean losing a packet or acknowledgement which then requires retransmission.

Delay can be tolerable in different degrees by applications, for example online chatting or conferences need to have the minimum delay possible.

Jitter is the variation in delay for packets belonging to the same flow.

High Jitter: difference between delays is large

Low jitter: difference between delays is small.

Bandwidth depends on the application. In video conferences, for example, there is a need to send million of bits per second to refresh a colour screen while sending a email may not reach even a million.

4 0
3 years ago
Question # 4
natka813 [3]

Answer:

class

Explanation:

edg2020

4 0
3 years ago
What happens when you double-click one of the graphic options in the middle panel of the choose a smartart graphic dialog box?
pickupchik [31]
When you open MS Word, selecting the insert option and clicking SmartArt, will pop up SmartArt dialog box. Double-clicking on one of the graphic options in the middle panel will automatically select and place the graphic art you want. It is an easy way of inserting a SmartArt of your choice without selecting the art itself and clicking OK.





3 0
3 years ago
Read 2 more answers
Other questions:
  • Most students overestimate their skill level and abilities to take open book tests.
    11·2 answers
  • Constantine forms the following hypothesis. Let n be any non-negative number that meets the following condition: when n is divid
    10·1 answer
  • A drowsy cat spots a flowerpot that sails first up and then down past an open window. The pot is in view for a total of 0.50 sec
    13·1 answer
  • Discussion Six: Code of Ethics IT workers have many different relationships, including those with employers, clients, suppliers,
    7·1 answer
  • PLEASE ANSWER THIS IM IN A QUIZ
    15·2 answers
  • Radio waves can be used to transmit energy. What is an advantage of this method in computer technology
    7·2 answers
  • The working window of a presentation is the O outline O handout 0 notes o slide​
    5·2 answers
  • Who here has a crush on jk from bts but feels more mature than him
    10·2 answers
  • Pls say correct guyz pls pls pls
    7·1 answer
  • You've just received an email message that indicates a new serious malicious code threat is spreading across the internet. The m
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!