From c56b99c4946682594e5ce60730819b90353defe6 Mon Sep 17 00:00:00 2001 From: Zahra Gharagozloo Mazlaghan Date: Thu, 30 Apr 2026 00:47:59 +0330 Subject: [PATCH] The movie class completed. --- src/main/java/movie/apis/Movie.java | 82 +++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) diff --git a/src/main/java/movie/apis/Movie.java b/src/main/java/movie/apis/Movie.java index 969774a..07914b1 100644 --- a/src/main/java/movie/apis/Movie.java +++ b/src/main/java/movie/apis/Movie.java @@ -16,9 +16,85 @@ public class Movie { private String imdb_rating; private String country; - // TODO: Create a constructor with all fields + //TODO + public Movie (Long id, String title, List genres, + List 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 simple constructor with id and title only + //TODO + public Movie (Long id, String title) { + this.id = id; + this.title = title; + } - // TODO: Create getters and setters for all fields + // TODO + + //Getters: + + public Long getId () { + return id; + } + + public String getTitle () { + return title; + } + + public List getGenres () { + return genres; + } + + public List getImages () { + return images; + } + + public String getYear() { + return year; + } + + public String getImdb_rating() { + return imdb_rating; + } + + public String getCountry() { + return country; + } + + + //Setters: + + public void setId(Long id) { + this.id = id; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setGenres(List genres) { + this.genres = genres; + } + + public void setImages(List images) { + this.images = images; + } + + public void setYear(String year) { + this.year = year; + } + + public void setImdb_rating(String imdb_rating) { + this.imdb_rating = imdb_rating; + } + + public void setCountry(String country) { + this.country = country; + } } \ No newline at end of file