class Movie{
constructor(title,director,genre,releaseDate,rating){
this.title=title;
this.director=director;
this.genre=genre;
this.releaseDate=releaseDate;
this.rating=rating;
}
getOverview=()=>{
return(`${this.title}, a ${this.genre} film directed by ${this.director} was released in year ${this.releaseDate}. It received a rating of ${this.rating}.`)
}
}
const Spiderman = new Movie("Spiderman", "Sam Raimi", "Action", 2002, 87);
const Batman = new Movie("The Dark Knight", "Christopher Nolan", "Action", 2008, 83);
console.log(Spiderman);
console.log(Spiderman.getOverview());
console.log(Batman.getOverview());