Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
912 B
0
Indexable
Never
    #ifndef MOVIE_H
    #define MOVIE_H
    #include <string>

    using namespace std;

    class Movie
    {
    private:
        string	name;
        string	genre;
        int		year;

    public:
        Movie();
        
        Movie(string n, int y, string g) {
            name = n;
            year = y;
            genre = g;
        }
        
        void setName(string n) {
            name = n;
        }
        string getName() const {
            return name;
        }
        void setGenre(string g) {
            genre = g;
        }
        string getGenre() const {
            return genre;
        }
        void setYear(int y) {
            year = y;
        }
        int getYear() const {
            return year;
        }
        void print() const {
            cout << name << " " << year << " " << genre;
        }
    };

    #endif