// Driver to test Movie class #include #include "Movie.h" using namespace std; #include bool operator==(const Movie &m1, const Movie &m2) { return (m1.GetName()==m2.GetName()); } int main() { Movie m1; cout <<"What's the name of your favorite movie:"; // cin >> m1.name; //Cannot do this, as name is private member of Movice string str; cin >> str; m1.SetName (str); //this will set m1.name to str cout<<"What's the rating:"; string rating; cin >> rating; m1.SetRating (rating); cout <<"Movie m1's name is now:"; cout <> num; for (int i=0;i> ratingInput; } while (ratingInput>5 or ratingInput<1); m2.AddRating (ratingInput); } cout <<"Average rating is" <GetName()<<", rated "<< p->GetRating()<