Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4bd003b929 |
@@ -14,7 +14,7 @@ public class Movie
|
||||
|
||||
private String imdb_votes;
|
||||
private String director;
|
||||
private String actors;
|
||||
private List<String> actors;
|
||||
private String runtime;
|
||||
private String rated;
|
||||
private String released;
|
||||
@@ -136,16 +136,25 @@ public class Movie
|
||||
this.director = director;
|
||||
}
|
||||
|
||||
public String getActors() {return actors;}
|
||||
public List<String> getActors()
|
||||
{
|
||||
return actors;
|
||||
}
|
||||
|
||||
public void setActors(String actors) {this.actors = actors;}
|
||||
public void setActors(List<String> actors)
|
||||
{
|
||||
this.actors = actors;
|
||||
}
|
||||
|
||||
public String getRuntime()
|
||||
{
|
||||
return runtime;
|
||||
}
|
||||
|
||||
public void setRuntime(String runtime) {this.runtime = runtime;}
|
||||
public void setRuntime(String runtime)
|
||||
{
|
||||
this.runtime = runtime;
|
||||
}
|
||||
|
||||
public String getRated()
|
||||
{
|
||||
@@ -162,7 +171,10 @@ public class Movie
|
||||
return released;
|
||||
}
|
||||
|
||||
public void setReleased(String released) {this.released = released;}
|
||||
public void setReleased(String released)
|
||||
{
|
||||
this.released = released;
|
||||
}
|
||||
|
||||
public String getPlot()
|
||||
{
|
||||
|
||||
@@ -176,9 +176,13 @@ public class MovieService
|
||||
System.out.println("======================================================================");
|
||||
System.out.println("Rating: " + movie.getImdb_rating() + "/10 | Votes: " + movie.getImdb_votes());
|
||||
System.out.println("Director: " + movie.getDirector());
|
||||
System.out.println("Cast: " + movie.getActors());
|
||||
|
||||
String cast = (movie.getActors() != null) ? String.join(", ", movie.getActors()) : "";
|
||||
System.out.println("Cast: " + cast);
|
||||
|
||||
String genresText = (movie.getGenres() != null) ? String.join(", ", movie.getGenres()) : "";
|
||||
System.out.println("Genre: " + genresText);
|
||||
|
||||
System.out.println("Runtime: " + movie.getRuntime() + " | Rated: " + movie.getRated());
|
||||
System.out.println("Country: " + movie.getCountry() + " | Released: " + movie.getReleased());
|
||||
System.out.println("Plot: " + movie.getPlot());
|
||||
|
||||
Reference in New Issue
Block a user