Question: Language is c++ need help with classes just started working with them. I need to make Movie a member function setMovie that populates all three
Language is c++
need help with classes just started working with them.
I need to make Movie a member function setMovie that populates all three attributes
then repeat the code to allow user to enter data for 2 differenct movie by making 2 objects of movie class
the last 2 lines of main calls get movie function for te 2 different objects
please explain final compiling code
my code
#include
int main() { string temp; Movie obj1; obj1.setTitle("Jurassic Park"); temp = obj1.getTitle(); cout << temp << endl; return 0; }
expected output
Enter the movie title. Gone with the wind Enter the movie director. Victor Fleming Enter the movie year. 1940 Enter the movie title. Roman Holiday Enter the movie director. William Wyler Enter the movie year. 1953 Gone with the wind Victor Fleming 1940 Roman Holiday William Wyler 1953
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
