Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class AdvancedMovie
- {
- //these fields are not needed, it was me showing predefined values before making a constructor so they are not undefined
- Title = "";
- Year = 0;
- Country = "";
- Genre = "";
- Director = "";
- Rating = 0.0;
- Artists = [];
- constructor(_Title = "Ghosts of Mars",_Year = 2001,_Country = "USA",_Genre = "Action/Sci-Fi/Horror",_Director = "John Carpenter",_Rating = 4.9 ,_Artists = ["Natasha Henstridge","Ice Cube","Jason Statham","Clea DuVall","Pam Grier","Joanna Cassidy","Richard Cetrone","Rosemary Forsyth","Liam Waite","Duane Davis","Lobo Sebastian","Rodney A. Grant","Peter Jason","Wanda De Jesus","Doug McGrath","Rick Edelstein","Robert Carradine","Michael Krawic","Ellen Weisinger","Rex Linn","Matt Nolan","Marjean Holden","Charlotte Cornwell"])
- {
- this.Title = _Title;
- this.Year = _Year;
- this.Country = _Country;
- this.Genre = _Genre;
- this.Director = _Director;
- this.Rating = _Rating;
- this.Artists = _Artists;
- }
- get getTitle()
- {
- return this.Title;
- }
- get getYear()
- {
- return this.Year;
- }
- get getCountry()
- {
- return this.Country;
- }
- get getGenre()
- {
- return this.Genre;
- }
- get getDirector()
- {
- return this.Director;
- }
- get getRating()
- {
- return this.Rating;
- }
- get getArtists()
- {
- return this.Artists;
- }
- get getFullInfo()
- {
- var FullInfo = "Movie Information: <br> Title: " + this.getTitle() + "<br>" + "Year: " + this.getYear() + "<br>" + "Country: " + this.getCountry() + "<br>" + "Genre: " + this.getGenre() + "<br>" + "Director: " + this.getDirector() + "<br>" + "Rating: " + this.getRating() + "<br>" + "Artists: " + this.getArtists() + "<br>";
- return FullInfo;
- }
- set setTitle(_Title)
- {
- this.Title = _Title;
- }
- set setYear(_Year)
- {
- this.Year = _Year;
- }
- set setCountry(_Country)
- {
- this.Country = _Country;
- }
- set setGenre(_Genre)
- {
- this.Genre = _Genre;
- }
- set setDirector(_Director)
- {
- this.Director = _Director;
- }
- set setRating(_Rating)
- {
- this.Rating = _Rating;
- }
- set setArtists(_Artists)
- {
- this.Artists = _Artists;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement