-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPelicula.java
More file actions
40 lines (32 loc) · 818 Bytes
/
Pelicula.java
File metadata and controls
40 lines (32 loc) · 818 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
public class Pelicula extends Video implements IVisualizable{
public Pelicula(){
}
public Pelicula(String titulo, String creador){
super(titulo, creador);
}
public Pelicula(String titulo, String genero, String creador, int año, int duracion){
super(titulo, genero, creador, año, duracion);
}
@Override
public String toString(){
return super.toString().concat(" mins.");
}
@Override
public void marcarVisto(){
this.visto = true;
}
@Override
public boolean esVisto(){
return this.visto;
}
@Override
public void tiempoVisto(){
if(esVisto() == true){
int mins = (int) ((Math.random() * getDuracion())+1);
System.out.println(" - - " + mins + " mins vistos." + " - - ");
}
else{
System.out.println("Sin reproducir.");
}
}
}