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
Sati [7]
3 years ago
13

A programmer wants to write a procedure that calculates the net elevation - total number of feet a traveler goes up and down. Fo

r example, looking at the first 3 segments of travel, the net elevation is 7 feet (up 3, up 1, down 3). Write procedure (in either JavaScript or pseudocode) called processPath(data) that: Accepts a list of elevation data as a parameter For every value in the list Compute the absolute difference between that value and the value next to it on the path Add the difference to a running total Return the total elevation traveled
Computers and Technology
1 answer:
ch4aika [34]3 years ago
3 0

Answer:

Pseudocode

////////////////////////////////////////////////////////////////////////////////////////////////////////////

Integer netElevation(list of elements of type elevation - type and number)

<em>function open</em>

   Define running total = 0

   for each element from list

   <em>loop open</em>

       elevation type = element[i].type

      if (elevation type == Up)

           running total = running total + element[i].number

       else

           running total = running total - element[i].number

   <em>loop close</em>

   return running total

<em>function close</em>

You might be interested in
All of the following are parts of the word processing window except _____. \
Rainbow [258]
<span>All of the following are parts of the word processing window except for the button esc ____.</span>
5 0
3 years ago
Write a Java program in jGRASP that creates a 2D integer array of 5 rows and 20 columns, fills it with increasing integer values
Alex73 [517]

Answer:

As per the question we need to make 5 rowa and 2o columns, in this we have total element 100 so range should be 0 to 99, but we are suggested to keep range 0 to 59, so i have kept the elementns in the range, but if it was a typo in the question for range you do not need to reset the k with zero.

Explanation:

//create a new class  TestArray

public class TestArray {

//define main method

public static void main(String[] args) {

 //declare a 2D array of given size i.e. 5 rows and 20 columns

 int arr[][] = new int[5][20];

 //declare an integer variable k and initialize it with zero, this will used to initialize the array from 0 to 99

 int k = 0;

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //initialize arr with the current value of k

   arr[i][j] = k;

   //once k is 59 set it zero again as we are not going beyond 59

   if(k == 59)

    k = 0;

   //increment value of k with 1

   k++;

  }

 }

 //print the element from the array one by one

 //for loop for rows

 for (int i = 0; i < 5; i++) {

  //for loop for columns

  for (int j = 0; j < 20; j++) {

   //print the current element of array and an space with it

   System.out.print(arr[i][j]+" ");

  }

  // move the cursor to new line

  System.out.println();

 }

}

}

7 0
3 years ago
Please complete the following questions. It is important that you use complete sentences and present the questions and answers w
Vanyuwa [196]

Answer:

well... i came for the same answer

Explanation:

7 0
3 years ago
Read 2 more answers
Stamps offers at-home postage and mailing for a monthly fee. Customers are able to carry a balance on their accounts that allows
alexdok [17]

Answer:

The pop-up button is necessary to show acceptance of the terms

Explanation:

5 0
2 years ago
Which tool can you use to display hardware utilization statistics that tell you about the operation of your computer?
defon

Performance monitor tool can you use to display hardware utilization statistics.

<h3>what is a performance Monitor?</h3>
  • Performance Monitor is a system monitoring program introduced in Windows NT 3.1. It monitors various activities on a computer such as CPU or memory usage.

To learn more about performance monitoring, refer

to brainly.com/question/12960090

#SPJ4

7 0
2 years ago
Other questions:
  • Consider the code below. Note that the catch statements in the code are not implemented, but you will not need those details. As
    11·1 answer
  • In which area of engineering does material selection play a vital role a design optimization b forensic engineering c mechanical
    6·1 answer
  • A job application is a form used to make a job request.<br> True<br> False
    8·2 answers
  • Which one of the following parts of a universal motor does not move? A. The armature B. The field coil C. The shaft D. The commu
    5·1 answer
  • What component of Kerberos is responsible for storing keys for encrypting and decrypting data in the authentication process?
    13·1 answer
  • The
    6·2 answers
  • State four features of information​
    5·1 answer
  • Web analytical packages can obtain the following information when someone visits a website, except Group of answer choices name
    9·1 answer
  • The Brinley website will not let me search for questions anymore. It says “Search all you want in-app” and then covers the quest
    14·1 answer
  • A system analyst generally needs to have a number of skills. For example, technical and analytical skills are required for this
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!