24 lines
564 B
Java
24 lines
564 B
Java
public class Movie extends MediaItem {
|
|
/**
|
|
* Creates a new movie with the duration, title and views.
|
|
*
|
|
* @param duration The duration.
|
|
* @param title The title.
|
|
* @param views The views.
|
|
*/
|
|
public Movie(int duration, String title, int views) {
|
|
super(duration, title, views);
|
|
}
|
|
|
|
/**
|
|
* Returns a string representation of the movie.
|
|
*
|
|
* @return A string representation of the movie.
|
|
*/
|
|
@Override
|
|
public String toString() {
|
|
return "Movie: " + super.toString();
|
|
}
|
|
|
|
}
|