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
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
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 _____.
Want to see the full answer?
Check out a sample textbook solutionChapter 15 Solutions
C++ How to Program (10th Edition)
- Final - Patient ChargesCreate pseudocode, flowchart and python code for the Patient Charges program. This final project requires multiple files (modules, drivers, and your main).Design a class named Patient that has fields for the following data: ● First name, middle name, last name● Address, city, state, and ZIP code● Phone number● Name and phone number of emergency contactThe Patient class should have a constructor that accepts an argument for each field. The Patient class should also have accessor and mutator methods for each field.Next, write a class named Procedure that represents a medical procedure that has been performed on a patient. The Procedure class should have fields for the following data:● Name of the procedure● Date of the procedure● Name of the practitioner who performed the procedure● Charges for the procedureThe Procedure class should have a constructor that accepts an argument for each field. The Procedure class should also have accessor and mutator methods for…arrow_forwardProblem Statement: Develop an Inventory Management System (IMS) for a small retail business that allows the user to manage their product inventory. The system should enable the user to add, edit, update, and delete product information stored in a .csv file. The IMS should be console-based with a menu-driven interface. Requirements: 1. Classes and Objects: - Create a `Product` class with attributes such as `productID`, `productName`, `price`, `quantity`. - Implement a `InventoryManager` class that will handle operations like adding, editing, updating, and deleting products. - Use a `Main` class with the `main` method to run the program and display the menu. 2. File Operations: - Store product information in a .csv file named `inventory.csv`. - Implement methods in `InventoryManager` for reading and writing to the .csv file. 3. Menu-Driven Interface: - Implement a menu in the `Main` class that allows the user to select operations like Add, Edit, Update, Delete, and View Inventory. - Use…arrow_forwardThis is an object oriented programming question The code should be in C++ language Create a class Student having a private data members S_ID, S_Name and S_CGPA. Now create a public member functions void getID(), void getName() and getCGPA() and finally to display all the data members, create a function void display(). In the main(), create an array of student class, size of the array should be taken from user at run time and call all the functions defined in the class. Sample Output: Student 1 Enter ID: 1 Enter Name: Ali Enter CGPA: 2.5 Student 2 Enter ID: 2 Enter Name: Ahmed Enter CGPA: 2.9 Student 3 Enter ID: 3 Enter Name: Zain Enter CGPA: 3.4 Student 1 informationID: 1 Name: Ali CGPA: 2.5 Student 2 information ID: 2 Name: Ahmed CGPA: 2.9 Student 3 information ID: 3 Name: Zain CGPA: 3.4arrow_forward
- CS 232 - Lab #6 - Pets Ahoy! We have recently been discussing the creation of classes in C++. Recall that classes serve as a "template" for the objects in our program, and that when we instantiate a class, we are creating an object which models the properties and behaviors of real-world objects. For this assignment, design and implement a parent class to represent a pet and several small sub-classes of the most common pets for cats, dogs, birds, and turtles. Each pet object is characterized by a type, name, birth date, owner, weight, sex, speak, and color. The variable data type for the type variable is a string that identifies the type of pet as a "dog", "cat", "bird", "turtle". The name is a string that identifies the name of the pet. The owner variable is a string that designates the name of the pet's owner. The weight specifies the pet's weight in pounds and is a double value. The speak variable is a string that holds an onomatopoeia of the sound the animal makes when it “speaks”…arrow_forward1.An object is has two parts. The_______ which identifies the properties of the object and the________ which are operations that can be performed on that data. 2.A(n) __________ shares the same characteristics and packages data and functionality together. 3.Data is ___________ to a variable. 4.Python objects are created by____________.arrow_forward/ CLASS PROVIDED: IntSet (a container class for a set of// int values)//// CONSTANT// static const int MAX_SIZE = ____// IntSet::MAX_SIZE is the highest # of elements an IntSet// can accommodate.// CONSTRUCTOR// IntSet()// Pre: (none)// Post: The invoking IntSet is initialized to an empty// IntSet (i.e., one containing no relevant elements).// CONSTANT MEMBER FUNCTIONS (ACCESSORS)// int size() const// Pre: (none)// Post: Number of elements in the invoking IntSet is returned.// bool isEmpty() const// Pre: (none)// Post: True is returned if the invoking IntSet has no relevant// relevant elements, otherwise false is returned.// bool contains(int anInt) const// Pre: (none)// Post: true is returned if the invoking IntSet has anInt as an// element, otherwise false is returned.// bool isSubsetOf(const IntSet& otherIntSet) const// Pre: (none)// Post: True is returned if all…arrow_forward
- In c++ Please Help. Please do not use chat GPTarrow_forward2. A struct Container with member variables size, capacity, and data. 1 struct Container{ 2 int size = 0; 3 int capacity = 0; int *data = nullptr; 4 5 }; 1 3. Implement the Container Functions shown below. 1 // Construct a Container c with a size s and initial value val. 2 // Defaults are zero. 3 void construct_container( Container& c, int s = 0, int val= 0 ); 4 5 // Destroy Container c and return memory to the freestore (heap). 6 void destroy_container ( Container& c ); 7 8 // Returns pointer to the first element in Container c. 9 int* data ( const Container& c ); 10 11 // Returns the number of elements in Container c. 12 int size ( const Container& c); 13 14 // Returns a reference 15 // (optional) Throws std::string exception if out of bounds 16 int& at ( Container& c, int i); 17 to the element at location i in Container v. 18 // Returns a reference to the last element in Container c. 19 // (optional) Throws std::out-of_range exception if Container is empty 20 int& back ( const…arrow_forwardChat Application Write a GUI Java program to implement a client/server chat application using Java sockets and threads. 1000 ... Server Client Client Connected to: localhost Now Connected to localhost Send Send Project instructions 1) The total grade for the project is 05 marks. 2) Each student must implement the project individually without any participation with other students. 3) Your program has to be split into several appropriate functions and classes. 4) The style and readability of your program will also determine your grade, in addition to the correctness of the program. Write your Code here Paste your Output Screen here Serverarrow_forward
- Java Code Now that we've discussed how object inheritance works, we've covered all of the basic principles of object-oriented design. You should now be familiar with two different methodologies for creating programs: Structural/Procedural design: A program is split into one or more functions, which can all be in the same file or in different files. The code runs sequentially, using no dynamic binding. Code and data are kept separate. This is how you first learned to write programs, before you knew how to create classes and objects. Object-Oriented design: A program is split into different groupings of data and code called objects. The program runs by creating interactions between objects, which may involve dynamic binding (polymorphism) to decide what functions to call at runtime. The data and code are inseparable from each other, and data is often hidden to prevent unwanted access by unknown code. This is how we've learned to write programs in this course. state what you believe are…arrow_forwardThe _______________operator dynamically allocates memory for an object of a specified typeand returns a(n)______________ to that typearrow_forwardThis is an object oriented programming question The code should be in c++ language Create a class Employee having a private data members E_ID, E_Name, E_Age and E_Salary. Now create a public member function void getData() and void ShowData() to take and display an employee data. In the main(), function create an array of Employee class, size of the array should be taken from user at run time and call all the functions defined in the class. Sample Output: Enter details of Employee 1 Enter Employee Id: 101 Enter Employee Name: Usman Enter Employee Age: 29 Enter Employee Salary: 45000 Enter details of Employee 2 Enter Employee Id: 102 Enter Employee Name: Sana Enter Employee Age: 31 Enter Employee Salary: 51000 Enter details of Employee 3…arrow_forward
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology Ptr