title: Cinema profit calculation and movie sorting problem using C++ classes and vectors
body: <p>Given a class <code>Movie (id, title, ranking, release date, character number, ticket price, comment etc.)</code>, <code>enum type: ACTION, COMEDY, DRAMA, FANTASY etc.</code> and a class <code>Cinema (name, location)</code>. I need to write a function <code>calculateProfit ( Movie*, day)</code> that would calculate cinema's profit based on some particular day. Also I need to write a method of choosing a movie based on some parameters and sort the movies based on release date. I've been thinking over this problem for a few days already, but it seems like I just can't write the proper code.</p>
  <p>Here I listed my main struggles:</p>
  <ol>
  <li>How to properly handle this enum, it can't be passed to the object by a constructor I used for passing everything else?</li>
  <li>I don't know how to link these movies to a particular day. How can I create a vector in Cinema class formed by iteratevely(or maybe there is a better way of doing this?) adding objects of the Movie class, so that it will do the trick?</li>
  <li>How to get a list of all objects of a Movie class that have the same particular attributes?</li>
  <li>I have an idea how to write an algorithm to sort an array of release dates. But the problem is to put these dates into an array/vector. How can I iterate through objects' attributes in C++ in order to push them into my vector?</li>
  </ol>
  <p>Here is the brief template for my classes:</p>
  <pre><code>using namespace std;
  
  class Movie{
  public:
      int ID;
      string Title;
      int Ranking;
      string ReleaseDate;
      int CharacterNumber;
      int TicketPrice;
      string Comment;
      //SortingByDate
      enum type{
          ACTION, COMEDY, DRAMA, FANTASY
      };
      Movie(int, string, int, string, int, int, string, type);
      Movie();
  };
  Movie::Movie(int ID, string Title,int Ranking,string ReleaseDate,int CharacterNumber, int TicketPrice,string Comment, type Type){
      this-&gt;ID=ID;
      this-&gt;Title=Title;
      this-&gt;Ranking=Ranking;
      this-&gt;ReleaseDate=ReleaseDate;
      this-&gt;CharacterNumber=CharacterNumber;
      this-&gt;TicketPrice=TicketPrice;
      this-&gt;Comment=Comment;
      //this-&gt;type=Type;  //How to pass enums like this using a constructor?
  }
  class Cinema{
  private:
      int calculateProfit();
  public:
      //Vector with objects of Movie class
      string name;
      string location;
  
  };
  </code></pre>