Implement Movie.java class-add all getters and setters + constructor method

This commit is contained in:
2026-04-28 19:11:14 +03:30
parent cd2006ec94
commit 80b5a6b696
+72
View File
@@ -16,9 +16,81 @@ public class Movie {
private String imdb_rating;
private String country;
public Movie(Long id, String title, List<String> genres, List<String> images,
String year, String imdb_rating, String country) {
this.id = id;
this.title = title;
this.genres = genres;
this.images = images;
this.year = year;
this.imdb_rating = imdb_rating;
this.country = country;
}
// TODO: Create a constructor with all fields
public Movie(Long id, String title) {
this.id = id;
this.title = title;
}
// TODO: Create a simple constructor with id and title only
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public List<String> getGenres() {
return genres;
}
public void setGenres(List<String> genres) {
this.genres = genres;
}
public List<String> getImages() {
return images;
}
public void setImages(List<String> images) {
this.images = images;
}
public String getYear() {
return year;
}
public void setYear(String year) {
this.year = year;
}
public String getImdb_rating() {
return imdb_rating;
}
public void setImdb_rating(String imdb_rating) {
this.imdb_rating = imdb_rating;
}
public String getCountry() {
return country;
}
public void setCountry(String country) {
this.country = country;
}
// TODO: Create getters and setters for all fields
}