Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Bartleby Related Questions Icon
Related questions
Question
Transcribed Image Text:Integer numFeatured Items is read from input. Then, numFeatured Items strings are read and stored in vector febFeatured Items,
and numFeatured Items strings are read and stored in vector oct Featured Items. Perform the following tasks:
• If febFeatured Items is equal to oct Featured Items, output "February's featured items are the same as October's featured
items. Otherwise, output "February's featured items are not the same as October's featured items."
Assign octBackup as a copy of octFeatured Items.
Ex: If the input is 3 dresser chair bench recliner sideboard armoire, then the output is:
February's featured items: dresser chair bench
October's featured items: recliner sideboard armoire
February's featured items are not the same as October's featured items.
October's backup: recliner sideboard armoire
18
19
20
21
22
23
24
25
26
27
28
29
30
Ni vsiy u IVULUI
for (i = 0; i < febFeatured Items.size(); ++i) {
cin >> febFeatured Items.at(i);
cout << febFeatured Items.at (i) << " ";
}
cout << endl;
cout << "October's featured items: ";
for (i = 0; i < oct Featured Items.size(); ++i) {
cin >> oct Featured Items.at(i);
cout << oct Featured Items.at (i) << " ";
}
cout << endl;
V* Your code goes here */
cout << "nctober's backup: ";
fac
31
32
CS ++*
55
cout << octBackup.at (i) << " ";
I
Transcribed Image Text:CS
Integer numFeatured Items is read from input. Then, numFeatured Items strings are read and stored in vector febFeatured Items,
and numFeatured Items strings are read and stored in vector octFeatured items. Perform the following tasks:
●くろまる
If febFeatured Items is equal to oct Featured Items, output "February's featured items are the same as October's featured
items." Otherwise, output "February's featured items are not the same as October's featured items."
• Assign octBackup as a copy of octFeatured Items.
Ex: If the input is 3 dresser chair bench recliner sideboard armoire, then the output is:
February's featured items: dresser chair bench
October's featured items: recliner sideboard armoire
February's featured items are not the same as October's featured items.
October's backup: recliner sideboard armoire
1 #include <iostream>
2 #include <vector>
3 using namespace std;
4
5
6
7
8
vector<string> febFeatured Items;
9
vector<string> oct Featured Items;
10
vector<string> octBackup;
11
12
cin >> numFeatured Items;
13
14 febFeatured Items.resize(numFeatured Items);
oct Featured Items.resize(umFeatured Items):
16
17
18
int main() {
int numFeatured Items;
unsigned int i;
Scaffeatur
cout << "February's featured items: ";
for (i = 0; i < febFeatured Items.size(); ++i) {
fahroakumad Thome akli
3
Expert Solution
Check MarkThis question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
bartleby
This is a popular solution
bartleby
Trending nowThis is a popular solution!
bartleby
Step by stepSolved in 4 steps
Knowledge Booster
Background pattern image
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
- Integer numFeatured items is read from input. Then, numFeatureditems strings are read and stored in vector mayFeatured items, and numFeatured Items strings are read and stored in vector sepFeatured Items. Perform the following tasks: . If mayFeatured items is equal to sepFeatured Items, output "May's featured items and September's featured items are identical." Otherwise, output "May's featured items and September's featured items are not identical." Assign sepBackup as a copy of sepFeatureditems. Ex: If the input is 4 sofa armchair shoe rack hammock couch cupboard bookshelf mattress, then the output is: May's featured items: sofa armchair shoerack hammock September's featured items: couch cupboard bookshelf mattress May's featured items and September's featured items are not identical. September's backup: couch cupboard bookshelf mattress 1 #include 2 #include 3 using namespace std; 4 5 int main() { 6 7 8 vector mayFeatured Items; 9 vector sepFeatured Items; 10 vector sepBackup; 11...arrow_forwardProduce the following program. Series 8arrow_forwardIn c++ i have this information Type of Ticket &. Cost Monday. Adult= 25ドル and Child = 15ドル Thursday. Adult = 40ドル and child = 20ドル I have made a vector to store this information Vectorticket ={"Monday", "Thursday"}; Vectoradult = {25, 40}; Vectorchildren ={15, 20}; Thr format of the adult and children vectors is in the order such that the first elements in those vectors correspond with the first element in the ticket vector Now what am struggling with, is i want the program to calculate the total cost of the tickets in correspondant with The user’s inputs which will be the quantity of how many tickets the user bought respectively (adult and children) So something like Monday 1 2 So 1 will be quantity of adult ticket and 2 will quantity of children ticket and the total costs of both added togetherarrow_forward
- Question : Imagine that you track your commute times for (10 days) and recorded your observations in minutes as {17, 16, 20, 24, 22, 15, 21, 15, 17, 22}. Enter your observations into a series (vector) in Python and label it 'data'. Next answer the following questions: ●くろまる How many times were your commute 20 minutes or more? Hint: Write a condition! What percent of your commutes are less than 17 minutes?arrow_forwardWrite a program that lets the user enter the total rainfall for each of 12 months into a vector of doubles. The program will also have a vector of 12 strings to hold the names of the months. The program should calculate and display the total rainfall for the year, the average monthly rainfall, and the months with the highest and lowest amounts. Part 1 Write main(). In main do the following:(a) Declare a vector of doubles and a vector of strings.Suggested variable name for vector of doubles is rainfall. Suggested variable name for vector of strings is monthNames(b) Store the months in your string vector in the following order: January, February, March, April, May, June, July, August, September, October, November, December. Make sure you write out the month names fully (do not use abbreviations).(c) Get input for 12 doubles from the user to place into the vector of doubles. Each double will be the amount of rain for the month parallel to the string vector of month names.(d) Display the...arrow_forwardIntegers are read from input and stored into a vector until 0 is read. If the vector's last element is odd, output the odd elements in the vector. Otherwise, output the even elements in the vector. End each number with a newline. Ex: If the input is -9 12 -6 1 0, the vector's last element is 1. Thus, the output is: -9 1 Note: (x % 2 != 0) returns true if x is odd. int value; int i; bool isodd; 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 } cin>> value; while (value != 0) { } for (i = 0; i> value; Check return 0; 1 Next level 2 X 1: Compare output 3 4 For input -9 12 -6 1 0, the vector elements are -9, 12, -6, and 1. The last element, 1, is odd. The odd elements in the vector, -9 and 1, are output, each on a new line. Not all tests passed. 2 V 3arrow_forward
- Input a list of employee names and salaries and store them in parallel arrays. End the input with a sentinel value. The salaries should be floating point numbers Salaries should be input in even hundreds. For example, a salary of 36,510 should be input as 36.5 and a salary of 69,030 should be entered as 69.0. Find the average of all the salaries of the employees. Then find the names and salaries of any employee who's salary is within 5,000 of the average. So if the average is 30,000 and an employee earns 33,000, his/her name would be found. Display the following using proper labels. i need to do this in raptor.arrow_forwardC++ Codearrow_forwardIntegers are read from input and stored into a vector until 0 is read. If the vector's last element is odd, output the odd elements in the vector. Otherwise, output the even elements in the vector. End each number with a newline. Ex: If the input is -9 12 -6 1 0, the vector's last element is 1. Thus, the output is: -9 1 Note: (x % 2!= 0) returns true if x is odd. 4 5 int main() { 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20} vector vect1; int value; int i; bool isodd; cin>> value; while (value != 0) { vect1.push_back(value); cin>> value; } V* Your code goes here */ return 0; 2 3arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education