MyLab Programming with Pearson eText -- Access Card -- for Starting Out with C++ from Control Structures to Objects (My Programming Lab)
9th Edition
ISBN: 9780134484198
Author: GADDIS
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Textbook Question
Chapter 7, Problem 34RQE
The two types of containers defined by the STL are ____________ and _____________.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
#include <iostream>
using namespace std;
int main()
{
string c_name, address, c_spe, c_status;
int c_qualification;
int c_year_of_passing , c_experience, c_age, offered_s, expected_s, contact_n;
cout <<"\" Welcome to Muscat Recruitment Agency\""<<endl<<endl;
cout <<"-------------------------------------------"<<endl<<endl;
cout<<" \" Personal Data\""<<endl<<endl;
cout<<"1-Enter Candidate name:";cin>>c_name;
cout<<"2-Enter Candidate age :";cin>>c_age;
cout<<"3-Enter Candidate Contact No:";cin>>contact_n;
cout<<"4-Enter Candidate address (city):";cin>>address;
cout<<endl<<endl;
cout<<"\"Education\""<<endl<<endl;
cout<<"1-Enter Candidate highest qualifivation (if masters =1 if doctorate=2 if diploma = 3 if bachelors=4): ";cin>>c_qualification;
cout<<"2-Enter Candidate specialisation (Engineering /…
Implement the Customer component following the requirements below using C Language...
Requirements-
Represent the Customers in your code using a 3D character array
The maximum number of customers that can be saved is 128.
Create a function list_customer which lists all customer data resembling the example run below.
Create a function add_customer which prompts the user to input new customer information. Your code should check to make sure the customer does not already exist before adding it to the 3D array. Also check that the customer can be added based on the maximum number of customers in the system.
Create a function get_customer which searches the customer data given an customer ID. If the customer exists, return the index within the data that the customer was found.
Create a function find_customer which accepts a string containing the name of an customer to search for. It should return the index of the customer in the database.
Each of the above functions should accept the 3D…
C++ format please, thanks
Write a function named "FriendsWithPets" that takes a const reference to a std::map of my friends names (std::string) to the number of pets they own (int) and returns the number of friends (int) that have at least one pet.
You should be using the STL algorithms to achieve this and no looping (no "while" or "for" keywords anywhere in the solution).
#include<map>
#include<algorithm>
#include<iostream>
#include<regex>
Chapter 7 Solutions
MyLab Programming with Pearson eText -- Access Card -- for Starting Out with C++ from Control Structures to Objects (My Programming Lab)
Ch. 7.3 - Define the following arrays: A) empNums, a...Ch. 7.3 - Prob. 7.2CPCh. 7.3 - Prob. 7.3CPCh. 7.3 - Prob. 7.4CPCh. 7.3 - What is array bounds checking? Does C++ perform...Ch. 7.3 - What is the output of the following code? int...Ch. 7.3 - The following program skeleton contains a...Ch. 7.3 - Define the following arrays: A) ages, a 10-element...Ch. 7.3 - Is each of the following a valid or invalid array...Ch. 7.6 - Given the following array definition: int values[]...
Ch. 7.6 - Given the following array definition: int nums[5]...Ch. 7.6 - Prob. 7.12CPCh. 7.6 - What is the output of the following code? (You may...Ch. 7.7 - Prob. 7.14CPCh. 7.7 - Prob. 7.15CPCh. 7.7 - When used as function arguments, are arrays passed...Ch. 7.7 - What is the output of the following program? (You...Ch. 7.7 - The following program skeleton, when completed,...Ch. 7.9 - Prob. 7.19CPCh. 7.9 - How many elements are in the following array?...Ch. 7.9 - Write a statement that assigns the value 56893.12...Ch. 7.9 - Prob. 7.22CPCh. 7.9 - Prob. 7.23CPCh. 7.9 - Fill in the table below so that it shows the...Ch. 7.9 - Write a function called displayArray7. The...Ch. 7.9 - A video rental store keeps DVDs on 50 racks with...Ch. 7.11 - Prob. 7.27CPCh. 7.11 - Write a definition statement for a vector named...Ch. 7.11 - Prob. 7.29CPCh. 7.11 - Write a definition statement for a vector named...Ch. 7.11 - Prob. 7.31CPCh. 7.11 - snakes is a vector of doubles, with 10 elements....Ch. 7 - Prob. 1RQECh. 7 - Look at the following array definition: int...Ch. 7 - Why should a function that accepts an array as an...Ch. 7 - Prob. 4RQECh. 7 - Prob. 5RQECh. 7 - Prob. 6RQECh. 7 - Prob. 7RQECh. 7 - Assuming that numbers is an array of doubles, will...Ch. 7 - Prob. 9RQECh. 7 - Prob. 10RQECh. 7 - How do you establish a parallel relationship...Ch. 7 - Prob. 12RQECh. 7 - When writing a function that accepts a...Ch. 7 - What advantages does a vector offer over an array?Ch. 7 - Prob. 15RQECh. 7 - The size declarator must be a(n) ________ with a...Ch. 7 - Prob. 17RQECh. 7 - Prob. 18RQECh. 7 - The number inside the brackets of an array...Ch. 7 - C++ has no array ________ checking, which means...Ch. 7 - Starting values for an array may be specified with...Ch. 7 - If an array is partially initialized, the...Ch. 7 - If the size declarator of an array definition is...Ch. 7 - By using the same _________ for multiple arrays,...Ch. 7 - Prob. 25RQECh. 7 - Prob. 26RQECh. 7 - To pass an array to a function, pass the ________...Ch. 7 - A(n) _______ array is like several arrays of the...Ch. 7 - Its best to think of a two-dimensional array as...Ch. 7 - Prob. 30RQECh. 7 - Prob. 31RQECh. 7 - When a two-dimensional array is passed to a...Ch. 7 - The ________________ is a collection of...Ch. 7 - The two types of containers defined by the STL are...Ch. 7 - The vector data type is a(n) ____________...Ch. 7 - Prob. 36RQECh. 7 - To store a value in a vector that docs nor have a...Ch. 7 - To determine the number of elements in a vector,...Ch. 7 - Use the _______________ member function to remove...Ch. 7 - To completely clear the contents of a vector, use...Ch. 7 - Prob. 41RQECh. 7 - Prob. 42RQECh. 7 - In a program, you need to store the identification...Ch. 7 - Prob. 44RQECh. 7 - In a program, you need to store the populations of...Ch. 7 - The following code totals the values in two...Ch. 7 - Prob. 47RQECh. 7 - Prob. 48RQECh. 7 - Prob. 49RQECh. 7 - Prob. 50RQECh. 7 - Prob. 51RQECh. 7 - T F The individual elements of an array are...Ch. 7 - T F The first element in an array is accessed by...Ch. 7 - Prob. 54RQECh. 7 - Prob. 55RQECh. 7 - T F Subscript numbers may be stored in variables.Ch. 7 - T F You can write programs that use invalid...Ch. 7 - Prob. 58RQECh. 7 - T F The values in an initialization list are...Ch. 7 - T F C++ allows you to partially initialize an...Ch. 7 - T F If an array is partially initialized, the...Ch. 7 - T F If you leave an element uninitialized, you do...Ch. 7 - T F If you leave out the size declarator of an...Ch. 7 - T F The uninitialized elements of a string array...Ch. 7 - T F You cannot use the assignment operator to copy...Ch. 7 - Prob. 66RQECh. 7 - T F To pass an array to a function, pass the name...Ch. 7 - T F When defining a parameter variable to hold a...Ch. 7 - T F When an array is passed to a function, the...Ch. 7 - T F A two-dimensional array is like several...Ch. 7 - T F Its best to think of two-dimensional arrays as...Ch. 7 - T F The first size declarator (in the declaration...Ch. 7 - T F Two-dimensional arrays may be passed to...Ch. 7 - T F C++ allows you to create arrays with three or...Ch. 7 - Prob. 75RQECh. 7 - T F To use a vector, you must include the vector...Ch. 7 - T F vectors can report the number of elements they...Ch. 7 - T F You can use the [ ] operator to insert a value...Ch. 7 - T F If you add a value to a vector that is already...Ch. 7 - int sixe; double values [size];Ch. 7 - Prob. 81RQECh. 7 - Prob. 82RQECh. 7 - Prob. 83RQECh. 7 - int numbers[8] ={1,2, , ,4, , 5};Ch. 7 - float ratings[] ;Ch. 7 - Prob. 86RQECh. 7 - Prob. 87RQECh. 7 - Prob. 88RQECh. 7 - void showValues(int nums [4][]) { For (rows = 0;...Ch. 7 - Prob. 90RQECh. 7 - Largest/Smallest Array Values Write a program that...Ch. 7 - Rainfall Statistics Write a program that lets the...Ch. 7 - Chips and Salsa Write a program that lets a maker...Ch. 7 - Larger than n In a program, write a function that...Ch. 7 - Monkey Business A local zoo wants to keep track of...Ch. 7 - Rain or Shine An amateur meteorologist wants to...Ch. 7 - Number Analysis Program Write a program that asks...Ch. 7 - Lo Shu Magic Square The Lo Shu Magic Square is a...Ch. 7 - Payroll Write a program that uses the following...Ch. 7 - Drivers License Exam The local Drivers License...Ch. 7 - Prob. 11PCCh. 7 - Grade Book A teacher has five students who have...Ch. 7 - Grade Book Modification Modify the grade book...Ch. 7 - Lottery Application Write a program that simulates...Ch. 7 - vector Modification Modify the National Commerce...Ch. 7 - World Series Champions If you have downloaded this...Ch. 7 - Name Search If you have downloaded this books...Ch. 7 - Tic-Tac-Toe Game Write a program that allows two...Ch. 7 - 2D Array Operations Write a program that creates a...Ch. 7 - Prob. 22PC
Additional Engineering Textbook Solutions
Find more solutions based on key concepts
Using an example of a component that implements an abstract data type such as a stack or a list, show why it is...
Software Engineering (10th Edition)
Write a loop that counts the number of digits that appear in the string referenced by mystring.
Starting Out with Python (4th Edition)
What output will be sent to the stuff.dat when the following lines are executed (assuming the lines are embedde...
Problem Solving with C++ (10th Edition)
Modify the temperature conversion program to print a heading above the table.
C Programming Language
Repair Bill Suppose automobile repair customers are billed at the rate of per hour for labor. Also, suppose co...
Introduction To Programming Using Visual Basic (11th Edition)
Which category of C++ reference variables always produces aliases?
Concepts Of Programming Languages
Knowledge Booster
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
- This is a program in C language. Help me debug this program. it has 3 errors. Please upload a screenshot also that it is working thank you./* This porgram uses the gotoxy() function and textcolor() for better screen display */ #include <iostream>#include <conio.h>#include <stdlib.h>using namespace std;main(){ int NoItem,ItemNo,Qty,ctr,Row=5; float UPrice,TAmt,ATendered,Change,APaid=0; char ItemDesc[15],TempChar; system("Color 5");; system("Color 2"); gotoxy(25,1);cout<< "[***] RICHLY SUPERMARKET [***]"; gotoxy(31,2);cout<< "Ayala Avenue, Makati"; gotoxy(6,4);cout<< "Item No. Description Qty. Unit Price Total Amount"; gotoxy(5,22);cout<< "No. of Item(s) Bought => [ ]"; gotoxy(37,22);cout<< "Total Amount to be Paid => "; gotoxy(37,23);cout<< "Amount Customer Tendered => "; gotoxy(37,24);cout<< "Amount of Change => "; gotoxy(31,22);cin>> NoItem;…arrow_forwardin C++ PLEASE #include <sys/types.h> #include <sys/wait.h> #include <unistd.h> #include <stdlib.h> #include <iostream> #include <pthread.h> #include <semaphore.h> #include <atomic> using namespace std; // The length of time the program should run int run_time; // The buffer that will be produced into and consumed from. int *buffer; int buffer_size; // The number of producers and consumers we will have int num_producers; int num_consumers; // TODO: Declare the semaphores that you will need to implement this algorithm // Semaphores are of type sem_t // TODO: Declare a mutex that you will use in your implementation. // Use type pthread_mutex_t // TODO: Declare any other global variables you will need to // use to implement your algorithm // These atomic variables will be used simply to generate unique numbers // to identify each thread. atomic_int producer_num(0); atomic_int consumer_num(0); // This is the function that will be…arrow_forwardwrite alogrithms for the following blocks of code... 2nd Block: int main(){//-------defining variables and initializing them------------- HRM info ; int c;char operation,ch;//--------Printing my name on screen----------------cout<< "Welcome to XYZ HR System Management by Kaiser, James."<<endl;cout<<"**************************************************************************"<<endl;cout<<endl<<endl<<endl;do{ cout<<"Welcome to Human Resource Management (HRM) Software of Company XYZ.";cout<<"To do specific task please choose one of the following commands."<<endl<<endl<<endl;cout<<" 1. Add new employee"<<endl;cout<<" 2. Delete employee information"<<endl;cout<<" 3. Update employee information"<<endl;cout<<" 4. Make reports based on specific field"<<endl;cout<<" 5. Search employee"<<endl;cout<<" 6. Quit"<<endl<<endl; while(!(cin>>c))…arrow_forward
- std::variant<T...> is a: ______. Select one: a. type-safe heterogeneous container able to store many objects whose types are of the types in the T... list of types b. type-safe heterogeneous container able to store objects whose types are each one of the types in the T... list of types stored in that order c. type-safe heterogeneous container able to store one (1) object whose type is one of the types in the T... list of typesarrow_forwardI need answer in C programming Language Create a program that checks if a password and the repeated confirmation password match according to the following criteria: The password must be at least 8 characters long. The password and confirmed password must match. The password must include at least 1 lowercase character. The password must include at least 1 uppercase character. The password must include at least 1 number. The password must include 1 of the following special characters: ! @ # $ ? In your code, create a function which accepts two character arrays representing the password and repeated password. If the password entered does not meet the requirements listed above, the function should return 1. If the password meets all the requirements, return 0. In main, print a statement indicating the result after the password checking function is called. Other Requirements Your code must use consistent formatting and spacing. Points will be taken off for inconsistent or sloppy code.…arrow_forward#include <iostream> using namespace std; // Write the prototypes for getData() and calcBMR() _____________________________________________ _____________________________________________ int main() { // Local Declarations double weight, height, age; char sex; double valBMR; //Call function to input person's information getData(weight, height, age, sex); //Call function to calculate BMR valBMR = calcBMR(weight, height, age, sex); // Output cout << "BMR: " << valBMR << endl; return 0; }// main //Define functions getData() and calc()arrow_forward
- Technology College Muscat hired you as a programmer to automate their manual StudentRegistration System. The college requires you to develop a C++ program to manage theirStudents’ personal and academic record.You are required to develop a C++ program using C++ structures, arrays, and userdefined functions.The college stores each student’s full name, a maximum of 30 character long, student’sage, numeric student’s ID number of 8 digits long, student’s modules enrolled andstudent’s module result.You are required to implement 3 different functions, a function to get/input all the data of astudent from a user. A function to get/input student’s modules and result against eachmodule and to calculate average marks of each students, and a function to display allstudents’ personal and academic data. You are required to demonstrate storing of 5students and displaying their stored data with average marks. You are also required tocalculate and display the overall result analysis for 5 students,…arrow_forwardModule/Week 5 ASSIGNMENT (USER-DEFINED FUNCTIONS)Write a C++ program that reads data from an input file, takes the data and computes student grades for an assignment by converting the raw score to a percentage given each student's score and the total points. The final score must be rounded up to the nearest whole value using the ceil function in the <cmath> header file and displayed as a percentage. You must also display the floating-point result up to 5 decimal places. You must use at least 2 functions: one to print the last name of the student and another function to compute and print the percentage as well as "Excellent" if the grade is greater than 90, "Well Done" if the grade is greater than 80, "Good" if the grade is greater than 70, "Need Improvement" if the grade is greater than or equal to 60, and "Fail" if the grade is less than 50. The main function is responsible for reading the input file and passing the appropriate arguments to your functions. Here is an example of…arrow_forwardNEED A PROGRAM CODE IN C++ VISUAL STUDIO AND OUTPUT. Write a program which has a class named Student. The class should have appropriate data members to store the enrollment number, name and email of a student. Write an appropriate function for taking the basic information like enrollment number, name and email from user. In addition, write another function to append the data to a text file on hard disk. Furthermore, there should be a function which displays the content of the file on console. In the main function create objects of the above class and call the appropriate functions to add information of a student, store it in a file and display on the console.arrow_forward
- In c++. The instructions are in the image. Please do not change existing code below just add to what is needed. I am very confused. Can you please show the input and output of the code it would help very much. There is also a text file which is named "input.txt" and it reads. Movie 11Genre1Movie 22Genre2Movie 33Genre3Movie 44Genre4Movie 55Genre5 main.cpp #include <iostream>#include <vector>#include <string>#include "functions.h" int main(){vector<movie> movies; char option; while (true){printMenu();cin >> option;cin.ignore();switch (option){case 'A':{string nm;int year;string genre;cout << "Movie Name: ";getline(cin, nm);cout << "Year: ";cin >> year;cout << "Genre: ";cin >> genre;//call you addMovie() herecout << "Added " << nm << " to the catalog" << endl;break;}case 'R':{ string mn;cout << "Movie Name:";getline(cin, mn);bool found;found = //call you removeMovie()here if (found == false)cout…arrow_forwardUsing C code Create a library named SoccerPlayer that defines the soccer player metrics. A player has the following characteristics: - Name: player’s first and last names (a string of 50 characters max) - Age: player’s age - Goals: number of goals scored in his/her career. - Games: number of games in which the player participated. Write a header file ‘ SoccerPlayer.h ’ which contains user defined structure representing a player ( soccer_player_t ) and functions to accomplish the following tasks: - Scan or read a player’s metrics. - Print a player’s metrics as follows (example): Name: Paul Smith Age: 35 years Goals scored: 310 goals in 1200 gamesarrow_forwardThis Program should be done using C language Implement the Customer component following the requirements below using C Language... Requirements- Represent the Customers in your code using a 3D character array The maximum number of customers that can be saved is 128. Create a function list_customer which lists all customer data resembling the example run below. Create a function add_customer which prompts the user to input new customer information. Your code should check to make sure the customer does not already exist before adding it to the 3D array. Also check that the customer can be added based on the maximum number of customers in the system. Create a function get_customer which searches the customer data given an customer ID. If the customer exists, return the index within the data that the customer was found. Create a function find_customer which accepts a string containing the name of an customer to search for. It should return the index of the customer in the database. Each…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education
C - File I/O; Author: Tutorials Point (India) Ltd.;https://www.youtube.com/watch?v=cEfuwpbGi1k;License: Standard YouTube License, CC-BY
file handling functions in c | fprintf, fscanf, fread, fwrite |; Author: Education 4u;https://www.youtube.com/watch?v=aqeXS1bJihA;License: Standard Youtube License