Task 4 Lab 10.cpp
Task 4 Lab 10.cpp
class Rental;
class Movie {
string title, genre, director;
};
class Customer {
int id;
string name;
};
class Rental {
Movie movie;
Customer customer;
public:
void set_movie( const Movie movie )
{
this->movie = movie;
}
void set_customer( const Customer customer )
{
this->customer = customer;
}
};
int main ()
{
Movie movie_1, movie_2, movie_3;
movie_2.set_title("Get Out");
movie_2.set_director("Jordan Peele");
movie_2.set_genre("Horror");
movie_3.set_title("Inception");
movie_3.set_genre("Thriller");
movie_3.set_director("Christopher Nolan");
customer_1.set_name("Atif Aslam");
customer_1.set_id(1);
customer_2.set_name("Bushra Ansari");
customer_2.set_id(2);
cout << rental_1 << '\n' << rental_2 << '\n' << rental_3 << endl;