#include <iostream>
#include <string>
#include <memory>
#include <vector>

using namespace std;

// Part B
struct Room 
{
	int d_noSeat;
	bool d_hasProjector;

	Room() = default;

	Room(const Room& r) :
		d_noSeat(r.d_noSeat),
		d_hasProjector(r.d_hasProjector)
	{}
};


class Event 
{
	std::shared_ptr<Room> d_room;
	std::string d_name;
public:
	Event() :
		d_room(0),
		d_name("") 
	{}

	Event(Room& r, const std::string& name):
		d_room(new Room(r)),
		d_name(name)
	{}

	Event(const Event& e) :
		d_room(new Room(*e.d_room)),
		d_name(e.d_name)
	{}

	void print()
	{
		std::cout << "Event: " << d_name;
		if (d_room != 0)
		{
			std::cout << " in size " << d_room->d_noSeat;
			if (d_room->d_hasProjector)
				std::cout << " with";
			else
				std::cout << " without";
			std::cout << " projector";
		}
		std::cout << std::endl;
		return;
	}

	~Event()	{}
};



int main() 
{
	const int noLect = 5;
	Room r;
	std::vector<Event> lectures;

	for (int i = 0; i < noLect; ++i) 
	{
		r.d_noSeat = i + 1;
		r.d_hasProjector = !r.d_hasProjector;
		lectures.emplace_back(r, "CSI2372");
		lectures[i].print();
	}

	std::cout << "-------------------" << std::endl;
	for (int i = 0; i < noLect; ++i) 
	{
		lectures[i].print();
	}
}