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
butalik [34]
3 years ago
15

For each of the following data storage needs, describe which abstract data types you would suggest using. Natural choices would

include list, set, map, but also any simpler data types (string, int, double) that you may have learned about before.
Try to be specific, e.g., rather than just saying "a list", say "a list of integers" or "a list of names (strings) and a GPA (double)". If you specify a map please describe what the key and value will be. Also, please give a brief explanation for your choice: we are grading you at least as much on your justification as on the correctness of the answer. Also, if you give a wrong answer when you include an explanation, we'll know whether it was a minor error or a major one, and can give you appropriate partial credit. Also, there may be multiple equally good options, so your justification may get you full credit.
a. a data type that allows quick retrieval of the name of a song given the name of a playlist (or album) and the track number
b. a data type to store the text of the steps of a recipe for how to bake a cake
c. a data type that associates a file extension with the possible programs that are able to read/open that kind of file
d. a data type that stores all the TV station identifications (e.g. KABC, KNBC, etc.)
Computers and Technology
1 answer:
timofeeve [1]3 years ago
8 0

Answer:

Explanation:

1. data type which allows quick retrieval of the name of a song given the name of a playlist(or album) and the track number would be :

map

It can be defined as a key-value pair where combination of playlist-track number would be the the key and song name/details would be the value for that corresponding key

2. data type to store the text of the steps of a recipe for how to bake a cake would be :

list

list of string datatype can be used : each item in the list will have recipe in the data part of the node

3. data type for storing file extension with the possible programs that are able to read/open that kind of file wold be

set

It can be defined as a key-value pair where file extension would be the the key and possible program list would be the value for that corresponding key

4. data type that stores all the TV station identifications (e.g. KABC, KNBC, etc..) would be :

map

as there is no duplication in the names of TV station so map with key/value pair of TV station name /details would be appropriate to be used

You might be interested in
What do newly PivotTables look like?
adell [148]

Answer:

Answer is in attached image!

Explanation:

8 0
3 years ago
Why does 5G mmWave require more cells to achieve a better signal?
svetoff [14.1K]

Answer:

Higher frequencies have a shorter range.

3 0
3 years ago
William has created a page view style sheet and saved it in a file named esd.css. What tags should William add to the document h
EleoNora [17]

Answer:

The answer is "<link href="esd.css" rel="stylesheet" />".

Explanation:

William will use the <link> tag because this tag is used to describe a connection between an external resource and an HTML file. In the <link> tag we use the href and rel attribute that is used to specify an anchor element target or destination and to define the current-linked file associate with.

  • This tag is an empty element, it contains only attributes.
  • The < link > tag is used to add existing style sheets.
  • The <link> tag also known as Singular Tag.
8 0
3 years ago
. Write a function definition as follows: it returns the C++ form of a Boolean value, its function identifier is anyTwoTheSame,
Paraphin [41]

Answer:

The c++ code to implement the Boolean function is given. The function definition is shown.

bool anyTwoTheSame(float a, float b, float c)

{

   bool same = false;    

   if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;        

   return same;

}

Explanation:

This function accepts three floating point numbers and returns true if any two numbers are equal else returns false.

The program below shows the implementation of this method.

#include <iostream>

using namespace std;

bool anyTwoTheSame(float a, float b, float c);

bool anyTwoTheSame(float a, float b, float c)

{

   bool same = false;    

   if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;        

   return same;

}

int main() {    

   float one=12.34, two=56.78, three=90.1;    

   cout<<"Two numbers are same : " <<anyTwoTheSame(one, two, three);

}

OUTPUT

Two numbers are same : 0

The method is first declared.

bool anyTwoTheSame(float a, float b, float c);

Next step is method definition which shows what the function is supposed to do. The test to check equality of two numbers is implemented as shown.

bool same = false;    

if(a == b)

       same = true;

   else if(a == c)

       same = true;

   else if(b == c)

       same = true;  

This is the simplest test which can be programmed.

If the numbers are not same, the Boolean variable, same, remains initialized to false.

This function is then called in main method.

No user input is taken as this is not specified in the question.

The three floating variables are declared and initialized inside the main. The values are put inside the program and not taken from the user.

The output shows either 0 or 1. 0 represents false and 1 represents true.

This program can be tested for different values of floating variables.

3 0
3 years ago
When Cloud Consumers are automatically redirected to the new cloud storage device?
Taya2010 [7]

Answer:

Cloud architecture are basically depend upon the storage replication system and it keeps synchronize the primary cloud data in the duplication storage.

And the redundant data is used when the logical unit number are migrated from one place to another. Then, it creates a copy of logical unit number.

Whenever, the primary device fail the storage path diverts the request of cloud user in secondary logical unit number and it automatically redirect to new cloud device storage.

6 0
4 years ago
Other questions:
  • Two electronics students are discussing electrical units. Student A says that electrical power is measured in units called coulo
    5·1 answer
  • What Windows Server 2016 feature leverages the storage contained on a network of servers and adds a new level of fault tolerance
    14·1 answer
  • The drawback to copyright protection is that the underlying ideas behind the work are not protected, only their manifestation in
    9·1 answer
  • According to the computer science what isCD ROM is a ​
    8·1 answer
  • Passwords are usually alphanumeric and usually cannot contain spaces or ________.
    10·2 answers
  • To make a black and white image out of a color image, you would use which option?
    7·1 answer
  • Consider the following two tables where EmployeeNum is primary key in both tables. What is the result of combining the two table
    15·1 answer
  • It's the same drop-down answers for both.
    15·1 answer
  • Is orgenized maningful and useful data​
    15·1 answer
  • Which new development in malware caused sandbox technology to automate and introduce artificial intelligence learning
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!