Untitled
unknown
plain_text
3 years ago
654 B
20
Indexable
#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);
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
Editor is loading...