C++ How to Program (10th Edition)
C++ How to Program (10th Edition)
10th Edition
ISBN: 9780134448237
Author: Paul J. Deitel, Harvey Deitel
Publisher: PEARSON
bartleby

Videos

Textbook Question
Book Icon
Chapter 15, Problem 15.5E

Fill in the blanks in each of the following statements:

a) The three styles of container classes are first-class containers, _______ and near containers.

b) Containers are divided into four major categories—sequence containers, ordered associative containers, _____ and container adapters.

c) The Standard Library container adapter most closely associated with the first-in, first- out (FIFO) insertion-and-removal discipline is the ______.

d) Built-in arrays, bitsets and valarrays are all _________ containers.
e) A(n) ______ constructor (C++11) moves the contents of an existing container of the same type into a new container, without the overhead of copying each element of the argument container.

f) The _______ container member function returns the number of elements currently in the container.

g) The _______ container member function returns true if the contents of the first container are not equal to the contents of the second; otherwise, returns false.

h) We use iterators with sequences—these be input sequences or output sequences, or they can be _________.

i) The Standard Library algorithms operate a container elements indirectly via _______.

j) Applications with frequent insertions and deletions in the middle and/or at the extremes of a container normally use a(n) ________.

k) Function __________ is available in every first-class container (except forward_list) and
it returns the number of elements currently stored in the container.

l) It can be wasteful to double a vector's size when more space is needed, for example, a full vector of 1,000,000 elements resizes accommodate 2,000.000 elements when a new element is added, leaving 999,999 unused elements. You can use ____ and ______ to control space usage better.

m) As of C++11, you can ask a vector or deque to return unneeded memory to the system by calling member function ____.

n) The associative containers provide direct access to store and retrieve elements via keys (often called search keys). The ordered associative containers are multi set, set, ___ and ___.

o) Classes ____ and ____ provide operations for manipulating sets of values where the values are the keys—there is not a separate value associated with each key.

p) We use C++11’s auto keyword to ____.

q) A multimap is implemented to efficiently locate all values paired with a given ____.

r) The Standard Library container adapters are stack, queue and _____.

Blurred answer
Students have asked these similar questions
Programming Assignment Containers are used to store objects of the same type and provide operations with which these objects can be managed. These operations include object insertion, deletion, and retrieval. Memory is allocated for containers dynamically at runtime. Containers thus provide a safe and easy way to manage collections of objects. The C++ standard library provides various class templates for container management in the Containers Library. These classes can be categorized as follows:  Sequential containers, where the objects are arranged sequentially and access to an object can either be direct or sequential.  Associative containers, where the objects are generally organized and managed in a tree structure and can be referenced using keys. Sequential Containers Sequential containers are distinguished by the operations defined for them, which are either generic or restricted. Restricted operations, such as appending at the end of a container, have constant…
14) Which of the following is an advantage of a doubly linked structure over a singly linked structure? a. it is less complex to implement b. you can easily access the next of an item C. you can easily access the successor of an item d. none of them e. All of them 15)    27) How is creating a subclass of an existing class different from copying the code from the existing class to a new file? a. no methods need be created or modified b. you don't need an __init__ method C. the name of the subclass is in parentheses of the class header d. delete all the methods that don't have to change   33) When you finish writing the abstract class, what must the subclasses do to use it?   a. reference the abstract class in their__init_method.   b. copy the code to the subclass file   C. import the abstract class   d. nothing, the abstract class is automatically included in subclass
Program language: C++ A publishing company markets both hardcopy and eBook versions of its work. Create a class publication that stores the title and price of a publication. From this class derive two classes: book, which adds a page count, and digital, which adds a storage capacity in MG bytes. Each of these classes should have a getdata() function to get its data from the user at the keyboard and put a putdata() function to display its data. Add a base class sales that hold an array of three floats so that it can record the dollar sales of a particular publication for the last three months. Include a getData() function to get three sales amounts from the user and a putdata() function to display the sales figures. Modify the book and digital classes so they are derived from both publication and sales. An object of the class book or digital should input and output sales data along with its other data. Write the main function to create a book object and a digital object and test their…
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
C++ Data Members; Author: CppNuts;https://www.youtube.com/watch?v=StlsYRNnWaE;License: Standard YouTube License, CC-BY