Question: this is C++ Need to write a movie.h and movie.cpp there are given a main.cpp and the OUTPUT have to be the same as the
this is C++ Need to write a movie.h and movie.cpp there are given a main.cpp and the OUTPUT have to be the same as the given. INSTRUCTIONS AND MAIN.CPP INSTRUCTIONS
Write the interface (Movie.h) and the implementation (Movie.cpp) of the class Movie according to the requirements listed below:
Member variables
Title of the movie stored as a string
Year when the movies was released stored as an int
Default constructor
Overloaded constructor
Parameter: A string storing a movie title and an int storing the year when the movie was released
Function getMovieTitle
Returns the name of the movie.
Function getYear
Returns the year when the movie was released.
Function setMovieTitle
Parameter: a string storing a movie title
Replaces the name of the movie stored in the calling object with the name passed by the parameter.
Function setYear
Parameter: an int storing a year
Replaces the year of the movie stored in the calling object with the year passed by the parameter.
Function print
Prints the movie title and the year in this format: Title (year)
Function sameYear
Parameter: An object of the class Movie
Compares the year of the movie stored in the calling object to the year of the movie passed by the parameter object.
Returns true if the year when they were released are the same, false otherwise.
Destructor
Left empty.
///////Main. cpp////// #include "Movie.h" #include 
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
