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
erastova [34]
2 years ago
14

Use appropriate method calls from the List ADT to create the following list:

Computers and Technology
1 answer:
Mumz [18]2 years ago
7 0

Answer:

The complete method is as follows:

public List buildList(List L) {  

 L.insert(30);

 L.insert(23);

 L.insert(19);

 L.insert(4);  

   return L; }

Explanation:

To complete the method, we make use of the insert() function.

This inserts elements of the list into list L. However, we have to start from the last element (i.e. in descending order)

So, the explanation is as follows:

 

 L.insert(30); --- This inserts the last element

Continue inserting in descending order

<em>  L.insert(23);  </em>

<em>  L.insert(19); </em>

Until the first list element is inserted

 L.insert(4);

This returns the filled list L  

   return L;

You might be interested in
What is the difference between a manufacturing engineer and a materials engineer?
lyudmila [28]
<span> a </span>manufacturing<span> or industrial </span>engineer<span> are mechanical </span>engineers<span> with ... Process </span>Engineers<span> specialise in processes where raw </span>materials<span> are converted using chemical processes resulting in significantly </span>different<span> ...</span>
7 0
3 years ago
Read 2 more answers
What special enterprise VPN supported by Cisco devices creates VPN tunnels between branch locations as needed rather than requir
castortr0y [4]

Answer:

Dynamic Multipoint VPN

Explanation:

4 0
2 years ago
How do Hlookup and Vlookup differ?
german

HLOOKUP performs the same function as VLOOKUP, but looks up data that has been formatted by rows. HLOOKUP searches for a value in the top row of a table, and then returns a value in the same column from a row you specify in the table or array

6 0
3 years ago
Read 2 more answers
C++
Cerrena [4.2K]

Answer:

#include <iostream>

#include<iomanip>

using namespace std;

double DrivingCost(double drivenMiles, double milesPerGallon, double dollarsPerGallon)

{

  double dollarCost = 0;

  dollarCost = (dollarsPerGallon * drivenMiles) / milesPerGallon;

  return dollarCost;

}

int main()

{

  double miles = 0;

  double dollars = 0;

  cout << "Enter miles per Gallon   : ";

  cin >> miles;

  cout << "Enter dollars per Gallon: ";

  cin >> dollars;

  cout << fixed << setprecision(2);

  cout << endl;

  cout << "Gas cost for 10 miles : " << DrivingCost(10, miles, dollars) << endl;

  cout << "Gas cost for 50 miles : " <<DrivingCost(50, miles, dollars) << endl;

  cout << "Gas cost for 400 miles: "<<DrivingCost(400, miles, dollars) << endl;

  return 0;

}

Explanation:

  • Create a method definition of DrivingCost that accepts  three input double data type parameters drivenMiles,  milesPerGallon, and dollarsPerGallon and returns  the dollar cost to drive those miles .
  • Calculate total dollar cost and store in the variable, dollarCost .
  • Prompt and read the miles and dollars per gallon  as input from the user .
  • Call the DrivingCost function three times  for the output to the gas cost for 10 miles,  50 miles, and 400 miles.

 

4 0
2 years ago
Read 2 more answers
What is the likely long-term consequence of an increase in the relative percent of greenhouse gases in Earth’s atmosphere?
NemiM [27]

Answer:

Earth's average temperature will increase.

Explanation:

5 0
3 years ago
Other questions:
  • _ includes websites that encourage interaction and connection among people, businesses, and organizations.
    5·1 answer
  • Which expense is a bank least likely to extend a line of credit for?
    13·2 answers
  • If you want to track users and sessions across multiple domains, what must you set up?
    11·1 answer
  • Implement the function pairSum that takes as parameters a list of distinct integers and a target value n and prints the indices
    11·1 answer
  • A user calls to report that she is experiencing intermittent problems while accessing the wireless network form her laptop compu
    9·1 answer
  • Pick 2 different operating systems and discuss how they can be used in daily operations.
    5·1 answer
  • In 1-2 sentences, describe some keyboard shortcuts you have used during this lesson to save you time.
    13·2 answers
  • How do i find the greatest common factor of two numbers?
    14·1 answer
  • Write: In a five-paragraph essay that is two to three pages in length, address the
    13·1 answer
  • is the practice of using the internet to provide healthcare without going to a doctor’s office or hospital.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!