hw5
This commit is contained in:
@@ -6,7 +6,8 @@ public class Movie {
|
||||
private int year;
|
||||
|
||||
public Movie(String title, double rating, int year) {
|
||||
//TODO
|
||||
// TODO: Initialize the instance variables (this.title, this.rating, this.year)
|
||||
// with the values passed as arguments to this constructor.
|
||||
}
|
||||
|
||||
public String getTitle() {
|
||||
@@ -23,7 +24,8 @@ public class Movie {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
//TODO
|
||||
// TODO: Return a string representation of the movie matching the exact required format.
|
||||
// Example format: "Movie: The Godfather, Rating: 9.2, Year: 1972"
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -34,4 +36,4 @@ public class Movie {
|
||||
Movie movie = (Movie) o;
|
||||
return Double.compare(movie.rating, rating) == 0 && movie.year == year && Objects.equals(title, movie.title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user