.13 LAB: Library book sorting Two sorted lists have been created, one implemented using a linked list (LinkedListLibrary linkedListLibrary) 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:

Answers

Answer 1

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.


Related Questions

Write and test a program that computes the area of a circle. This program should request a number representing a radius as input from the user. It should use the formula 3.14 * radius ** 2 to compute the area and then output this result suitably labeled.

Answers

Answer:

mark me brainlist

Explanation:

Why is graphics important in multimedia application

Answers

Graphics are important in multimedia application this is because humans are visually oriented etc.

Fictional Corp has a DNS server running within its VPC. It has decided to move one of the application servers to a different VPC. Which of the following is a step that the cloud administrator needs to perform as part of the move?
a. Migrate to an external DNS solution
b. Create a new VPC that will serve DNS needs for multiple other VPCs
c. Discontinue using DNS
d. Remove the DNS entries within the VPC that are no longer relevant

Answers

Answer:

Here the correct option is option b Create a new VPC that will serve DNS needs for multiple other VPCs.

Explanation:

Fictional Corp has a DNS server running within its VPC. It has decided to move one of the application servers to a different VPC. It's not possible to maneuver an existing instance to a different subnet or VPC. Instead, you'll manually migrate the instance by creating a new VPC Image from the source instance.  

b. Create a new VPC that will serve DNS needs for multiple other VPCs

the computer that process data that are represented in the form of discrete values are called​

Answers

Answer:

Digital computer

Explanation:

The computer that process data that are represented in the form of discrete values are called digital computer.

Which of these is unused normal, unvisited link ?? 1. a: link 2 a: visited 3 a: hover

Answers

Answer:

hover

Explanation:

I hope my answer is write

Assume that the following class is defined. Fill in the missing statements in the most direct possible way to complete the described method. class LooseChange: def __init__(self, value): self.value

Answers

Answer:

Already filled

Explanation:

The code above is the syntax for class definition in Python programming language. def __init__(self, value): self.value is definition of the constructor for the class LooseChange. The constructor function in a class is used to instantiate new objects or instances of the class. For example, if we wanted to define a new object of the class LooseChange, we would use the constructor defined in our class LooseChange.

If the following Java statements are executed, what will be displayed?
System.out.println("The top three winners are\n");
System.out.print("Jody, the Giant\n");
System.out.print("Buffy, the Barbarian");
System.out.println("Adelle, the Alligator")

Answers

Answer:

The top three winners are

Jody, the Giant

Buffy, the BarbarianAdelle, the Alligator

The answer is top three champions are Jody, the GiantBuffy, the BarbarianAdelle, the Alligator.

What is winners?A winner's perspective is one of optimism and enthusiasm. The multiple successful individuals I know all have a wonderful outlook. They know that every shadow has a silver lining, and when property happens, they recuperate quickly. They look for ways to control stuff from occurring because they learn from every position (see above point).Success is a comparative term. If you achieve what you desire to and are happy, then I believe that is a success. It could be applied to life in available or to particular tasks in life. ( college student with a mobility impairment) My description of success is achieving individual goals, whatever they may be.a small, usually circular area or section at a racetrack where distinctions are bestowed on defeating mounts and their jockeys. any special group of winners, achievers, or those that have been accepted as excellent: the winner's circle of acceptable wines.

To learn more about winners, refer to:

https://brainly.com/question/24756209

#SPJ2

As you are working on the Datacenter Edition server, you install a card to connect a set of RAID drives. After the card and drives are set up, you run the installation disc that accompanies the RAID drives and card. When you reboot the server, you get a message about problems with two .dll files. What has most likely happened and how can you fix it

Answers

Answer:

by fixing it with card

Explanation:

you have taken out the card I thing

Use the Internet to research external storage devices. Find at least three devices, with a minimum storage size of 1 terabyte (TB), from three different manufacturers. Write a paragraph, IN YOUR WORDS, for each device explaining the features and benefits. Provide the retail cost and include a reference link to each device. Next, write

Answers

Hi, you've asked an incomplete question. However, I provided suggestions on getting the desired information.

Explanation:

Considering the fact that you are required to find information about not just the cost, but also the features and benefits of three storage devices having a minimum storage size of 1 terabyte, it is recommended that you check this on a reputable e-commerce site (eg Amazon).

There you could find information about their features and benefits, as well as customer feedback about their experience using these devices.

convert 198 / 61 to ratio​

Answers

I think the answer is

198:61

I'm not sure

It is necessary to press the Enter key from the keyboard when this message appears "Enter the new date" with Date command in DOS operating system

Answers

Answer:

The Date should be entered in this format: mm-dd-yy

Explanation:

two reasons for compressing files before uploading them to cloud storage​

Answers

Answer:

Storage. File compression reduces the amount of space needed to store data. Using compressed files can free up valuable space on a hard drive, or a web server. Some files, like word files, can be compressed to 90 percent of their original size.

Explanation:

The main advantages of compression are reductions in storage hardware, data transmission time, and communication bandwidth. This can result in significant cost savings. Compressed files require significantly less storage capacity than uncompressed files, meaning a significant decrease in expenses for storage.

Write a SELECT statement that returns a single value that represents the sum of the largest unpaid invoices submitted by each vendor. Use a derived table that returns MAX(InvoiceTotal) grouped by VendorID, filtering for invoices with a balance due

Answers

Answer:

Create table vendor(vendor_id int,due_invoice int,invoiceTotal int);

Create view v as select vendor_id,max(due_invoice) as unpaid from vendor;

Select sum(unpaid) from v;

Select vendor_id,invoiceTotal from vendor group by vendor_id;

What are some of the advantages and disadvantages of connection-oriented WAN/Man as opposed to connection-less?

Answers

Answer and Explanation:

Connection oriented WAN/MAN as opposed to connection less network is a type of wide area network that requires communicating entities in the network to establish a dedicated connection for their communication before they start communicating. This type of network will use these established network layers only till they release it, typical of telephone networks.

Advantages include:

Connection is reliable and long.

Eliminates duplicate data issues.

Disadvantages include:

Resource allocation while establishing dedicated connection slows down speed and may not fully utilize network resources.

There are no plan B's for network congestion issues, albeit occurring rarely with this type of network.

ng questions two features of computer .​

Answers

Explanation:

accuracy, diligence, versatility

Write a recursive function num_eights that takes a positive integer pos and returns the number of times the digit 8 appears in pos

Answers

Answer:

Explanation:

The following is written in Java. It creates the function num_eights and uses recursion to check how many times the digit 8 appears in the number passed as an argument. A test case has been created in the main method and the output can be seen in the image below highlighted in red.

  public static int num_eights(int pos){

       if (pos == 0)

           return 0;

       if (pos % 10 == 8)

           return 1 + num_eights(pos / 10);

       else

           return num_eights(pos / 10);

   }

Write a program whose input is two integers and whose output is the two integers swapped. Place the values in an array, where x is position 0 and y is position 1.Ex: If the input is: 3 8 then the output is: 83 Your program must define and call a method: public static void swapValues (int[] "values) LabProgram.java 1 import java.util.Scanner; 23 public class LabProgram 4 5 /* Define your method here 6 7 public static void main(String[args) { 8 /* Type your code here. / 9 } 10 } 11

Answers

Answer:

import java.util.*;

import java.lang.*;

import java.io.*;

class Codechef

{ public static void swapValues(int[] values)

{int temp= values[0];

values[0]=values[1];

values[1]=temp;

System.out.print(values[0]+" "+values[1]);}

public static void main (String[] args) throws java.lang.Exception

{

Scanner sc= new Scanner(System.in);

int A[] = new int[2];

A[0] = sc.nextInt();

A[1]= sc.nextInt();

swapValues(A);

}

}

Input:-

3   8

Output:-

8   3

Input:-

1    2

Output:-

2   1

What is garbage in garbage out?​

Answers

Answer: it means if you give a bad input it will result in a ad output.

Explanation:

It has n acronym GIGO which refers to how the quality of an output is determined by the quality of input.

Garbage is trash info... or input. And grabage out is the trash output.

g Palindrome counting. Write a Python program stored in a file q3.py to calculate the number of occurrences of palindrome words and palindrome numbers in a sentence. Your program is case-insensitive, meaning that uppercase and lowercase of the same word should be considered the same. The program should print the palindromes sorted alphanumerically with their number of occurrences. Numbers must be printed first, and words must be printed nex

Answers

Answer:

The program is as follows:

sentence = input("Sentence: ")

numbers = []; words = []

for word in sentence.split():

   if word.lower() == word[::-1].lower():

       if word.isdigit() == False:

           words.append(word)

       else:

           numbers.append(int(word))

words.sort(); numbers.sort()

print(numbers); print(words)

Explanation:

This gets input for sentence

sentence = input("Sentence: ")

This initializes two lists; one for numbers, the other for word palindromes

numbers = []; words = []

This iterates through each word of the sentence

for word in sentence.split():

This checks for palindromes

   if word.lower() == word[::-1].lower():

If the current element is palindrome;

All word palindromes are added to word palindrome lists

       if word.isdigit() == False:

           words.append(word)

All number palindromes are added to number palindrome lists

       else:

           numbers.append(int(word))

This sorts both lists

words.sort(); numbers.sort()

This prints the sorted lists

print(numbers); print(words)

GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trademark licenses, and patent licenses. GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself. The cloud also needs to be designed in such a way that all users of the organization can access it without any lag. Which cloud computing option would be most suitable for GuardIN?

Answers

Answer:

GuardIN is an IT security firm. It deals with highly secure data for a wide variety of software and e-commerce agreements, trademark licenses, and patent licenses. GuardIN needs a cloud computing option that would allow it to purchase and maintain the software and infrastructure itself. The cloud also needs to be designed in such a way that all users of the organization can access it without any lag. Which cloud computing option would be most suitable for GuardIN?

Explanation:

Your new trainee is interested in ACLs (access control lists). He asks you want they can be used for. What should you tell him? A. Protect hosts from viruses.B. Classify network traffic.C. Provide high network availability.D. IP route filtering.

Answers

Answer:

B. Classify network traffic.

D. IP route filtering.

Explanation:

An access control can be defined as a security technique use for determining whether an individual has the minimum requirements or credentials to access or view resources on a computer by ensuring that they are who they claim to be.

Simply stated, access control is the process of verifying the identity of an individual or electronic device. Authentication work based on the principle (framework) of matching an incoming request from a user or electronic device to a set of uniquely defined credentials.

Basically, authentication and authorization is used in access control, to ensure a user is truly who he or she claims to be, as well as confirm that an electronic device is valid through the process of verification

Hence, an access control list primarily is composed of a set of permissions and operations associated with a network or file.

In Computer networking, access control lists (ACLs) can be used to perform the following tasks;

I. Classify network traffic: it can be used to classify the different networks on a router and define whether packets are rejected or accepted.

II. Internet protocol (IP) route filtering: any internet protocol (IP) address that's is not on the accept list would be refused permission into accessing a network. Thus, ACLs can either deny or accept IP addresses depending on the routing table configured on the router.

Select the correct answer.
What testing approach does a development team use when testing the developed code rather than just the functionality of the code?
A.
white box testing
B.
black box testing
C.
acceptance testing
D.
usability testing

Answers

Answer:

D. usability testing

Explanation:

A software can be defined as a set of executable instructions (codes) or collection of data that is used typically to instruct a computer how to perform a specific task and to solve a particular problem.

A software development life cycle (SDLC) can be defined as a strategic process or methodology that defines the key steps or stages for creating and implementing high quality software applications. There are seven (7) main stages in the creation of a software and these are;

1. Planning.

2. Analysis and requirements.

3. Software design and prototyping.

4. Development (coding).

5. Integration and testing

6. Deployment.

7. Operations and maintenance.

Usability testing is a testing technique used by a software development team to test a developed code rather than just the functionality of the code.

The main purpose of usability (user experience) testing is to determine how easy, user-friendly or difficult it is for end users (real people) to use a software application or program.

The advantages of cloud computing are demonstrated in the fact that software and hardware upgrades are minimized. Another advantage important to IT professionals and just about anyone that accesses data on computers is Multiple Choice the automatic backup of data. the need for fewer tech employees. better group decision making. less of a need to share data among many sources.

Answers

Answer: the automatic backup of data

Explanation:

Cloud computing simply refers to the delivery of computing services such as databases, servers, networking, storage, etc over the Internet that is, the cloud.

Advantages of closing d computing include faster innovation, minimal software and hardware upgrades, economies of scale, backup of data, better security, and the greater ability for data to be shared with others in the organization.

Select the correct answer.
Adam is part of a software design team assigned to create the interface for a kiosk application. What tool will he use to design the interface?
A.
timing chart
B.
pseudocode
C.
block diagram
D.
data dictionary

Answers

I will say that the answer is b

Answer:

its not block diagram

it could be data dictionary

Explanation:

what is the memory of the five generations of computers?​

Answers

Answer: Magnetic drum

Explanation: First generation computers used magnetic drum for memory

Answer:

What is the memory of the five generations of computers?​

The answer is Magnetic drum because First generation computers used magnetic drum for memory.

Hope this helps you :)

Write a program that first gets a list of integers from input. The input begins with an integer indicating the number of integers that follow. Then, get the last value from the input, which indicates a threshold. Output all integers less than or equal to that last threshold value. Assume that the list will always contain fewer than 20 integers.

Ex: If the input is
5 50 60 140 200 75 100

the output is
50 60 75

Answers

Answer:

The program in Python is as follows:

num = int(input())

numList = []

for i in range(num+1):

   numInput = int(input())

   numList.append(numInput)

for i in range(len(numList)-1):

   if numList[i] <= numList[-1]:

       print(numList[i],end=" ")

Explanation:

This gets input for the number of integers

num = int(input())

This initializes an empty list

numList = []

This iterates through the number of integers and gets input for each

for i in range(num+1):

   numInput = int(input())

The inputs including the threshold are appended to the list

   numList.append(numInput)

This iterates through the list

for i in range(len(numList)-1):

All inputs less than or equal to the threshold are printed

   if numList[i] <= numList[-1]:

       print(numList[i],end=" ")

User-Defined Functions: Miles to track lapsOne lap around a standard high-school running track is exactly 0.25 miles. Define a function named MilesToLaps that takes a float as a parameter, representing the number of miles, and returns a float that represents the number of laps.Then, write a main program that takes a number of miles as an input, calls function MilesToLaps() to calculate the number of laps, and outputs the number of laps. Ex: If the inout is 1.5the output is 6.0 Ex: If the input is 2.2the output is 8.8 Your program should define and call a function Function Miles ToLaps(float userMiles) returns float userLaps 12 // Deine Milestola hert. 34 // Deine Minhert. Your code ust call llestola 5

Answers

Answer:

Explanation:

The following is written in Java. The MilesToLaps method creates a variable called laps and gives it the value of the input parameter miles divided by 0.25. Then it returns the variable laps to the user. In the main method a Scanner object was created and asks the user for the number of miles which are passed to the MilesToLaps method which returns the number of laps. This can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("How many miles?");

       float miles = in.nextFloat();

      System.out.println("This is " + MilesToLaps(miles) + " laps");

   }

   public static float MilesToLaps(float miles) {

       float laps = (float) (miles / 0.25);

       return laps;

   }

}

Write a for loop to populate array userGuesses with NUM GUESSES integers. Read integers using Scanner. Ex If NUM GUESSES is 3 and user enters 9 5 2, then userGuesses is 19, 5, 2) 1 import java til. Sca nner 3 public class Store Guesses 4 public static void main (string args) Scanner SCnr new Scanner (System in final int NUM GUESSES int[] user Guesses new int[NUM. GUESSES] int 0; Your solution goes here 10 for (i 03 i NUM GUESSES ++i){ 11 user Guesses [i] scnr.nextInt 12 13 14 15 for (i 0; i NUM GUESSES ++i) 16 System.out print (u 17 18 19 for (i 0; i NUM GUESSES ++i)t 20 System Ou print (userGuesses[i] 21 Run X Testing for 12, 4, 6) 2 4 6 Expected output Your output 2 4 6 2 4 6 Tests aborted

Answers

Answer:  

import java.util.Scanner;  

public class StoreGuesses {  

  public static void main (String [] args) {  

      Scanner scnr = new Scanner(System.in);  

      final int NUM_GUESSES = 3;  

      int[] userGuesses = new int[NUM_GUESSES];  

      int i = 0;  

     

      for (i = 0; i < NUM_GUESSES; ++i){  

          userGuesses[i] = scnr.nextInt();  

      }  

      for (i = 0; i < NUM_GUESSES; ++i){  

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

      }  

  }  

}  

/*

Output:

2 4 6  

2 4 6  

*/

Scenario You are a network engineer and it is your first day working with ASU and you have been given the job of creating a network for the IT program. You are given the following three tasks to complete. 1. Configure IP addressing settings on network devices. 2. Perform basic device configuration tasks on a router. 3. Verify Layer 3 connectivity via a routing protocol. 4. Setup some access control lists.

Answers

B because one cause…………………

Kareem is working on a project for his manager. He has a few questions for a co-worker who he knows is knowledgeable on the subject. As they're discussing some of the topics, he gives the co-worker permissions to the resources so they can look at the information on their own. Which of the following access control methods does Kareem's company use?

a. DAC
b. RBAC
c. MAC
d. TSAC

Answers

Answer: RBAC

Explanation:

The access control methods that Kareem's company uses us the role based access control.

The Role-based access control (RBAC) simply means assigning permissions to users based on the role that such individual plays within an organization.

RBAC is a simple approach to access management and is typically less prone to error than in a scenario whereby permissions are assigned to users individually. Access rights are given to the workers based on what their job entails and what is needed and other information which isn't needed won't be accessible to them.

Other Questions
The actual number of amendments that the leaders first proposed was but two were not ratified at the time. circle o has a center of (5,5) and radius 4 cicle p has center (3,-1) and raidus 5. Which describes how circle o cab be transformed to show that circle P is similar to circle o Read the chart,WordPart of speechpassExample sentenceWe need a writtennote of permission inorder to pass throughthe territoryMeaningto go past ormove overBased on the information in the chart, what should Angel write in the "part of speech column?nounverbadjectiveadverb Which of the following represents x = 1/3y written in general form?3x - y = 0X-1/3y=01/3x-y=0 Which function represents g(x), a reflection of f(x) = }(10)* across the x-axis?O g(x) = - (10)*O g(x) = -(0)O g(x) = (10)O g(x) = { (10)* Whats the equation? The story of Sosu and the Bukari boys the point of views in the story Sunshine Meals Inc. is a company that sells breakfast foods such as cereals and pancake mixes. The company conducts a study to segment its consumers. It finds the following segments: Segment A: Consists of a small group of individuals who purchase four boxes of the brand's cereal every week. In comparison, the average user consumes one box every week. Sunshine targets segment A by providing them with samples of other Sunshine products with the purchase of one box of cereal. Segment B: Consists of a large number of college students and individuals who have recently begun living on their own and require ready-made mixes as their breakfast solution. Sunshine targets these consumers by providing more variety with pancakes and waffle mixes. Segment C: Consists of consumers who are not consistently buyers. Targeting these consumers could prove a loss for the company. what is the eqution of the line through the orgin and (-2,3) The Triple Alliance and Triple Entente were formed through the signing of If all possible random samples of size N are drawn from a population with a mean of mu and a standard deviation of sigma, then as N becomes larger, the sampling distribution of sample means becomes approximately normal with a mean of muy(bar) and a standard deviation of sigmay(bar). This statement is known as the: Which of the following is not typical of a capillary?Group of answer choicesVirutally all fluids pushed out at a capillary bed are taken up againThe exchange of substances between the blood and interstitial fluid takes place across the thin endothelial walls of the capillariesOsmosis from blood proteins tend to pull fluid back inBlood pressure tends to drive fluid out of capillaries Analyze the property of water you investigated and provide some real-world applications of the importance of this property of water. I did Surface Tension. Please Help! 1. How does the title of the first chapter, "The Eve of the War," affect the way you reactto what happens in the chapter? The shopkeeper smiled at David as if he were just telling a joke but his disparaging comments made David feel insulted and embarrassed Based of the context clues in the sentence, what is the most likely meaning of disputing select two options Which idea does the author use to conclude the paragraph? Game consoles: A poll surveyed 341 video gamers, and 95 of them said that they prefer playing games on a console, rather than a computer or hand-held device. An executive at a game console manufacturing company claims that the proportion of gamers who prefer consoles differs from . Does the poll provide convincing evidence that the claim is true What would you expect to happen to the velocity of the bobber if the mass of the washers in the cylinder remained the same and the radius was doubled? Please answer correctlyUrgent !! The following data represents the age of 30 lottery winners. 22 30 30 35 36 37 37 37 39 39 41 51 51 54 54 55 57 57 58 58 61 64 68 69 72 74 75 78 79 80 Complete the frequency distribution for the data.Age Frequency20-2930-3940-4950-5960-6970-7980-89