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
goldenfox [79]
3 years ago
14

.13 LAB: Library book sorting Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary linkedL

istLibrary) and the other implemented using the built-in Vector class (VectorLibrary vectorLibrary). Each list contains 100 books (title, ISBN number, author), sorted in ascending order by ISBN number. Complete main() by inserting a new book into each list using the respective LinkedListLibrary and VectorLibrary InsertSorted() methods and outputting the number of operations the computer must perform to insert the new book. Each InsertSorted() returns the number of operations the computer performs. Ex: If the input is:
Computers and Technology
1 answer:
Gre4nikov [31]3 years ago
7 0

Answer:

linkedListOperations = linkedListLibrary.InsertSorted(currNode, linkedListOperations); // this is right

linkedListLibrary.InsertSorted(currNode, linkedListOperations);  // half right, it count how much operation but it doesn't store it anywhere in main.

vectorOperations = vectorLibrary.InsertSorted(tempBook, vectorOperations);  // this is right

vectorLibrary.InsertSorted(tempBook, vectorOperations); // half right, it count how much operation but it doesn't store it anywhere in main.

cout << "Number of linked list operations: " << linkedListOperations << endl;

cout << "Number of vector operations: " << vectorOperations << endl;

Explanation:

The first, you are calling InsertSorted with linkedListLibrary and than you can store the number of operation inside the "linkedListOperations" variable. Then you do the same with vectorLibrary.

You might be interested in
0.6 tenths of an hour would be how many minutes?
astraxan [27]

Answer:

17 min bro

Explanation:

8 0
3 years ago
Read 2 more answers
Inputs to a system that can enhance performance is called
disa [49]
Inputs to a system that can enhance performance is called Resources
6 0
3 years ago
Read 2 more answers
Create a report showing the Order ID, the name of the company that placed the order, and the first and last name of the associat
8090 [49]

Answer:

/******************************

Both of the queries below will work in SQL Server

Oracle

******************************/

SELECT o.OrderID, c.CompanyName, e.FirstName, e.LastName

FROM Orders o

JOIN Employees e ON (e.EmployeeID = o.EmployeeID)

JOIN Customers c ON (c.CustomerID = o.CustomerID)

WHERE o.ShippedDate > o.RequiredDate AND o.OrderDate > '1-Jan-1998'

ORDER BY c.CompanyName;

/******************************

MySQL

******************************/

SELECT o.OrderID, c.CompanyName, e.FirstName, e.LastName

FROM Orders o

JOIN Employees e ON (e.EmployeeID = o.EmployeeID)

JOIN Customers c ON (c.CustomerID = o.CustomerID)

WHERE o.ShippedDate > o.RequiredDate AND o.OrderDate > '1998-01-01'

ORDER BY c.CompanyName;

8 0
3 years ago
Select the answer that best describes what an opportunity cost is?
Assoli18 [71]
A benefit, profit, or value of something that must be given up to acquire or achieve something else. Since every resource (land, money, time, etc.) can be put to alternative uses, every action, choice, or decision has an associated opportunity cost<span>.</span>
7 0
4 years ago
Read 2 more answers
If you see someone harassing someone else online you should ​
Sever21 [200]

Try to say something yourself, but if you are too scared, get an adult involved. The one bad thing you could do is ignore it.

4 0
4 years ago
Read 2 more answers
Other questions:
  • ____ is designed for short-distance connections and has only a few lambdas, with a greater space between lambdas. Group of answe
    9·2 answers
  • What is blockchain? How it works? I heard bitcoin uses it.
    8·1 answer
  • Annalise received financial aid offers from two universities. Financial Analysis for Option A Costs per Year Financial Aid Packa
    8·2 answers
  • Write a function named "higher_lower" that takes an int as a parameter and returns "higher" if 14 is greater than the input and
    11·1 answer
  • Two Smallest (20 points). Write a program TwoSmallest.java that takes a set of double command-line arguments and prints the smal
    7·1 answer
  • In which step of web design is storyboarding helpful?
    10·1 answer
  • Write a function that simulates the roll of a six-sided dice. The name of the function is rollDice. The function accepts no para
    8·1 answer
  • The purpose of a flowchart is similar to the purpose of pseudocode.<br> True<br> False
    5·2 answers
  • When one loop appears inside another, the loop that contains the other loop is called the ____ loop. Group of answer choices ind
    15·1 answer
  • What symbol do we use to assign a value to a variable or constant in algorithms?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!