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
Diano4ka-milaya [45]
4 years ago
9

Given the following sequence of names added to an ADT sorted list:nameListPtr->insertSorted("Tammie");nameListPtr->insertS

orted("Brenda");nameListPtr->insertSorted("Sarah");nameListPtr->insertSorted("Tom");nameListPtr->insertSorted("Carlos");What would be returned by the call nameListPtr-> getPosition("Tammie")a. 1b. 3c. 4d. 5
Computers and Technology
1 answer:
lesya692 [45]4 years ago
4 0

Answer:              

c. 4

Explanation:  

This will work as following:

Lets say first Tammie is inserted by this statement insertSorted("Tammie")

Next insertSorted("Brenda") statement adds Brenda on top of Tammie so the sequence is now

  1. Brenda  
  2. Tammie

Next insertSorted("Sarah"); statement inserts Sarah below Brenda and above Tammie so the sequence becomes:

  1. Brenda
  2. Sarah
  3. Tammie

Next insertSorted("Tom"); statement inserts Tom below Tammie so the sequence becomes:

  1. Brenda
  2. Sarah
  3. Tammie
  4. Tom

Lastly insertSorted("Carlos"); statement inserts Carlos above sarah and below brenda so the sequence becomes:

  1. Brenda
  2. Carlos
  3. Sarah
  4. Tammie
  5. Tom

Now the statement getPosition("Tammie") is called which returns the position value of Tammie. So as you can see above its position is 4th so output is 4.

You might be interested in
A company wants to use online methods to target more customers. It decides to conduct a market research by collecting the data o
Ronch [10]

Answer:

They could use a CRM

A CRM tool lets you store customer and prospect contact information, identify sales opportunities, record service issues, and manage marketing campaigns, all in one central location — and make information about every customer interaction available to anyone at your company who might need it.

They Could Use PDC

The term “primary data” refers to data you collect yourself, rather than data you gather after another party initially recorded it. Primary data is information obtained directly from the source. You will be the first party to use this exact set of data.

They Could Use Quantitative vs. Qualitative Data

Quantitative data comes in the form of numbers, quantities and values. It describes things in concrete and easily measurable terms. Examples include the number of customers who bought a given product, the rating a customer gave a product out of five stars and the amount of time a visitor spent on your website.

Why Should I Track Users Data:

To ensure it's going smoothly, it's important to keep track of data that directly correlates to the potential success of your business. Key performance and financial metrics can help you address any problems with your business before they occur

8 0
3 years ago
Write an exception tester application that enables you to see the impact of exceptions being thrown. Include multiple catch clau
AveGali [126]

Answer:

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

namespace ConsoleApplication1

{

class Program

{

static void Main(string[] args)

{

Console.WriteLine("\t\tHandling Exceptions Program");

Console.WriteLine("\n\tArithmetic Exception:\n");

// Arithmetic Exception is base class of DivideByZero Class

// Hence will be using DivideByZero Exception

int b = 0;

try

{

//Attempting Divide BY Zero

int myBadMath = (5 / b);

}

catch (System.DivideByZeroException ex)

{

Console.WriteLine("Error : Trying to divide a number by Zero");

}

//FormatException example

//Used when formats DO NOT match a data type

Console.WriteLine("\n\tFormat Exception:\n");

Console.WriteLine("Please enter a number :");

string str = Console.ReadLine();

double dNo;

try

{

//throws exception when a string is entered instead of a number

dNo = Convert.ToDouble(str);

Console.WriteLine(dNo+" : Is a valid number");

}

catch (FormatException ex)

{

Console.WriteLine("Error : "+str+" is not a valid number");

}

//IndexOutOfRangeException example

//Thrown when an element is attempted to assign or read out of the array size

Console.WriteLine("\n\tIndexOutOfRangeException Exception:\n");

try

{

//5 element array declared

int[] IntegerArray = new int[5];

//attempting 10th element. Hence error is thrown

IntegerArray[10] = 123;

}

catch (IndexOutOfRangeException)

{

Console.WriteLine("An invalid element index access was attempted.");

Console.Read();

}

}

}

}

Explanation:

8 0
3 years ago
What isthe history of technology from the 1980s to now and how is it used in classrooms?.?. PLEASE HELP
AlladinOne [14]

Answer:

Technology has a prestigious history. It took years for the technology to come up and prove its essence.

The Internet, World Wide Web, the development of websites, the introduction of Wikipedia and its evolution marks the golden period on 1980s which was followed by launch of certain search engines like google, bing, duckduck go and may more which made the surfing more easy and fun. Then further the launch of android phones and iPhones  brought up another revolution in technology.

Nowadays, technology finds its use almost everywhere. Talking about the classrooms, students resort to internet for exploring studies, topics, projects and much more. The use of Wikipedia has reached a whole new level. Teachers tend to provide assignments over the internet only in order to increase the exposure and reduce the use of paper which works in the collective good of both internet and nature!

3 0
3 years ago
Impact of computer in society, using relevant examples​
erica [24]
Computers have changed the way people relate to one another and their living environment, as well as how humans organize their work, their communities, and their time. Society, in turn, has influenced the development of computers through the needs people have for processing information.
3 0
3 years ago
Identify a characteristic of in-house hosting
zalisa [80]
<span>An identifying characteristic of in-house hosting is the ability to have total control of a data location. In-house hosting simply means that instead of relying on an outside or outsourced company to host your website, you do it yourself within your own company with your own employees.</span>
3 0
3 years ago
Other questions:
  • I have a bag of trail mix.half of the bag contains peanuts.1/4of the bag is chocolates candies, and 1/4of the bag is dried fruit
    12·2 answers
  • What is the capture of transaction and event information using technology to (1) process the information according to defined bu
    13·1 answer
  • How many possible keys does the playfair cipher have? an approximate power of 2
    14·1 answer
  • To edit the color of the text in presentation software, choose the Font color command Text Color in the ________ ribbon toolbar.
    15·2 answers
  • What type of device is characteristic of an enterprise environment? Question 14 options: a) A workstation used by a retired pers
    7·1 answer
  • /*this function represents
    8·2 answers
  • What is a mixer? BTW NOT just any mixer....a mixer in music<br> THis is for tech theater class
    6·1 answer
  • Choose the best answer from the drop-down menu. A ______ allows multiple connections to a single signal. Without a ______, conne
    7·2 answers
  • Explain how the internet works​
    7·2 answers
  • Which of the following is true about named ranges?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!