Reference no: EM13938161
Question 1
Refer to the figure above. Which of the following members in the UML diagram adds an element to the front of the queue?
1. front
2. addQueue
3. back
4. None of the above
Question 2
An effective way to implement a priority queue is to use a(n) ____ structure.
1. stack
2. array
3. varied
4. treelike
Question 3
//Program to test the queue operations
#include <iostream>
#include "linkedList.h"
#include "queueLinked.h"
using namespace std;
int main()
{
linkedQueueType<int> queue;
linkedQueueType<int> copyQueue;
int num;
cout<<"Queue Operations"<<endl;
cout<<"Enter numbers ending with -999"<<endl;
cin>>num;
while(num != -999)
{
queue.addQueue(num); //add an element to the queue
cin>>num;
}
copyQueue = queue; //copy the queue into copyQueue
cout<<"Queue contains: ";
while(!copyQueue.isEmptyQueue())
{
cout<<copyQueue.front()<<" ";
copyQueue.deleteQueue(); //remove an element from
//the queue
}
cout<<endl;
return 0;
}
Question 4
Based on the figure above, if you wanted to print out the contents of copyQueue in reverse order, which statement would do the job?
1. cout<<copyQueue.front();
2. cout<<copyQueue.back();
3. cout<<copyQueue.remove();
4. cout<<copyQueue.addQueue();
Question 5
One way to implement a priority queue is to use an ordinary ____.
1. linked-list
2. array
3. stack
4. list
Question 6
FIFO closely resembles which of the following?
1. the order in which print jobs of the same priority are executed by a printer
2. the order in which customers are serviced in a bank
3. the order in which shoppers are serviced on line to pay for their items
4. All of the above
Question 7
Refer to the figure above. Which of the following members in the UML diagram keeps track of the number of elements in a queue at a given point in time?
1. maxQueueSize
2. isFullQueue
3. count
4. num
Question 8
The function destroyQueue does which of the following?
1. uses one queue to delete another
2. deletes all instances of the queue
3. copies the queue into backup memory
4. removes all elements from the queue leaving an empty queue
Question 9
In a queuing system the time it takes for the server to serve the customer is known as the ____ time.
1. initiation
2. transaction
3. response
4. wait
Question 10
//Program to test the queue operations
#include <iostream>
#include "linkedList.h"
#include "queueLinked.h"
using namespace std;
int main()
{
linkedQueueType<int> queue;
linkedQueueType<int> copyQueue;
int num;
cout<<"Queue Operations"<<endl;
cout<<"Enter numbers ending with -999"<<endl;
cin>>num;
while(num != -999)
{
queue.addQueue(num); //add an element to the queue
cin>>num;
}
copyQueue = queue; //copy the queue into copyQueue
cout<<"Queue contains: ";
while(!copyQueue.isEmptyQueue())
{
cout<<copyQueue.front()<<" ";
copyQueue.deleteQueue(); //remove an element from
//the queue
}
cout<<endl;
return 0;
}
Question 11
Refer to the figure above. Assume you add the numbers 23, 76, 64 in this order. The output of the program will be which of the following?
1. Queue contains: 64 76 23
2. Queue contains: 23 76 64
3. Queue contains: 23 64 76
4. Queue contains: 76 64 23
Question 12
The function addQueue does which of the following?
1. adds all the contents from one queue to another
2. appends one queue to the back of another
3. adds a new element to the front of the queue
4. adds a new element to the rear of the queue
Implementing a health information technology strategic plan
: Discuss how you would go about implementing a health information technology (HIT) strategic plan for data security, privacy, and quality management for your organization
|
Monitoring systems section of lecture
: In the Monitoring Systems section of this lecture (attached), we mentioned that: It should be noted that these example protocols are not really related to computer systems.
|
Differentiate between data-information and knowledge
: A key understanding within knowledge management is to be able to define and differentiate between data, information and knowledge.
|
Summary of physical tamper-resistant
: Summary of physical tamper-resistant devices how to approach this homework question: a. First, make a list of all of the different types of physical tamper-resistant devices and their characteristics.
|
Uml diagram adds an element to the front of the queue?
: Refer to the figure above. Assume you add the numbers 23, 76, 64 in this order. The output of the program will be which of the following?
|
Calculate net profit margin and accounts receivable turnover
: The following information was taken from Nash, Inc.'s trial balances as of December 31, 2008, and December 31, 2009. Calculate the net profit margin and accounts receivable turnover for 2009.
|
Network infrastructure layer and in user clients or browsers
: Web phishing, pharming and vishing are popular web based scams. Discuss currently used tools and recommended measures to defeat this kind of attacks efficiently? Specifically focus on solutions that can be implemented at the network infrastructure..
|
Determine the best way to export her new grass seed
: How should Martha proceed to determine the best way to export her new grass seed?
|
Key understanding within knowledge management
: A key understanding within knowledge management is to be able to define and differentiate between data, information and knowledge.
|