Here are the contents for a movie: Lab 27 Home Alone Jeff Nunn 1990 Here are the contents for a movie: Rocky Al Davis 1984 NCEPTS: • More practice with the setter and getter functiofns. Enter the year of the movie to search for 1984 Found movie Rocky sk list: cscill1/lab27$ ./lab27 Here are the contents for a movie: Start by running the code listed below Create a searchMovie function within the Library class that searches for a movie given a year as a parameter value. Refer to the expected output listing below. Submit your lab27.cpp file on Home Alone Jeff Nunn 1990 Here are the contents for a movie: Rocky Al Davis and get a successful message. 1984 AMPLE OUTPUT (output shown in RED should be displayed from within the main function) Enter the year of the movie to search for 1990 1/cscill1/lab27$ ./lab27 ere are the contents for a movie: ome Alone Found movie Home Alone /cscill1/lab27$ eff Nunn 990

Np Ms Office 365/Excel 2016 I Ntermed
1st Edition
ISBN:9781337508841
Author:Carey
Publisher:Carey
Chapter8: Working With Advanced Functions
Section: Chapter Questions
Problem 4.4CP
icon
Related questions
Question
100%

Please answer.. It's urgent. Don't reject

Read carefully and write code

2 / 2
100%
SUing geUDIrector (
return director;
int getYear () (
return year;
include <iostream>
include<vector>
using namespace std:
class Library
class Movie
private:
vector<Movie> movievector;
public:
private:
string title;
string director;
int year;
void setMovie (Movie ml)
movievector.push back (ml);
public:
void setMovie (string sl, string d1, int yl)
void displayMovies ()
title - sl;
director d1;
year - yl;
for (int i = 0; i < movievector. size (); i++)
cout << "Here are the contents for a movie:" << endl;
cout << movievector[i].getTitle () << endl;
cout << movievector[i].getDirector 0 « endl;
cout << movievector[i]. getYear () << endl;
string getTitle ()
return title;
string getDirector ()
return director;
int main ()
int getYear () (
return year:
Library mylibrary;
Movie objl;
objl.setMovie ("Home Alone", "Jeff Nunn", 1990) :
Movie obj2;
obj2.setMovie ("Rocky", "Al Davis", 1984):
class Library
private:
vector<Movie> movieVector;
public:
mylibrary.setMovie (objl);
mylibrary.setMovie (obj2);
mylibrary.displayMovies ();
void setMovie (Movie ml)
movievector.push_back (ml);
return 0;
void displayMovies ()
for (int i- 0; 1< movievector.size (); i++)
cout << "Here are the contents for a movie:" << endl;
cout << movievector[i]. getTitle () « endl;
cout << movieVector [i).getDirector () << endl;
cout <e moievectorlil.getYear 0 « andl.
Transcribed Image Text:2 / 2 100% SUing geUDIrector ( return director; int getYear () ( return year; include <iostream> include<vector> using namespace std: class Library class Movie private: vector<Movie> movievector; public: private: string title; string director; int year; void setMovie (Movie ml) movievector.push back (ml); public: void setMovie (string sl, string d1, int yl) void displayMovies () title - sl; director d1; year - yl; for (int i = 0; i < movievector. size (); i++) cout << "Here are the contents for a movie:" << endl; cout << movievector[i].getTitle () << endl; cout << movievector[i].getDirector 0 « endl; cout << movievector[i]. getYear () << endl; string getTitle () return title; string getDirector () return director; int main () int getYear () ( return year: Library mylibrary; Movie objl; objl.setMovie ("Home Alone", "Jeff Nunn", 1990) : Movie obj2; obj2.setMovie ("Rocky", "Al Davis", 1984): class Library private: vector<Movie> movieVector; public: mylibrary.setMovie (objl); mylibrary.setMovie (obj2); mylibrary.displayMovies (); void setMovie (Movie ml) movievector.push_back (ml); return 0; void displayMovies () for (int i- 0; 1< movievector.size (); i++) cout << "Here are the contents for a movie:" << endl; cout << movievector[i]. getTitle () « endl; cout << movieVector [i).getDirector () << endl; cout <e moievectorlil.getYear 0 « andl.
Lab 27
Here are the contents for a movie:
Home Alone
Jeff Nunn
1990
Here are the contents for a movie:
Rocky
Al Davis
1984
CONCEPTS:
• More practice with the setter and getter functions.
Enter the year of the movie to search for
1984
Found movie Rocky
Task list:
cscil11/lab27$ ./lab27
Here are the contents for a movie:
Home Alone
1. Start by running the code listed below
2. Create a searchMovie function within the Library class that searches for a movie given a year as a parameter
Jeff Nunn
1990
value,
3. Refer to the expected output listing below.
4. Submit your lab27.cpp file on
Here are the contents for a movie:
Rocky
Al Davis
1984
and get a successful message.
SAMPLE OUTPUT (output shown in RED should be displayed from within the main function)
Enter the year of the movie to search for
/cscill1/lab27$./lab27
1990
Found movie Home Alone
Here are the contents for a movie:
Home Alone
/cscill1/1ab27$
Jeff Nunn
1990
Here are the contents fora movie:
Rocky
Al Davis
1984
Enter the year of the movie to search for
1984
Found movie Rocky
#include <iostream>
#include<vector>
using namespace std;
/cscill1/1ab27$./lab27
Here are the contents for a moOvie:
Transcribed Image Text:Lab 27 Here are the contents for a movie: Home Alone Jeff Nunn 1990 Here are the contents for a movie: Rocky Al Davis 1984 CONCEPTS: • More practice with the setter and getter functions. Enter the year of the movie to search for 1984 Found movie Rocky Task list: cscil11/lab27$ ./lab27 Here are the contents for a movie: Home Alone 1. Start by running the code listed below 2. Create a searchMovie function within the Library class that searches for a movie given a year as a parameter Jeff Nunn 1990 value, 3. Refer to the expected output listing below. 4. Submit your lab27.cpp file on Here are the contents for a movie: Rocky Al Davis 1984 and get a successful message. SAMPLE OUTPUT (output shown in RED should be displayed from within the main function) Enter the year of the movie to search for /cscill1/lab27$./lab27 1990 Found movie Home Alone Here are the contents for a movie: Home Alone /cscill1/1ab27$ Jeff Nunn 1990 Here are the contents fora movie: Rocky Al Davis 1984 Enter the year of the movie to search for 1984 Found movie Rocky #include <iostream> #include<vector> using namespace std; /cscill1/1ab27$./lab27 Here are the contents for a moOvie:
Expert Solution
steps

Step by step

Solved in 3 steps with 4 images

Blurred answer
Knowledge Booster
JQuery and Javascript
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
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage