-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRecital.java
49 lines (40 loc) · 1.04 KB
/
Recital.java
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
41
42
43
44
45
46
47
48
49
package tema5;
/**
*
* @author // Autor del ejercicio: github.com/Auchan22
*/
public abstract class Recital {
private String nombreBanda;
private String[] vTemas;
private int DIMF = 0;
private int DIML = 0;
//private int temaActual = 0;
public Recital(String n, int cant) {
this.nombreBanda = n;
this.DIMF = cant;
this.vTemas = new String[this.DIMF];
}
public String getNombreBanda() {
return this.nombreBanda;
}
public int getDIML() {
return this.DIML;
}
/*public int getTemaActual(){
return this.temaActual;
}*/
public void agregarTema(String n) {
if (this.DIML < this.DIMF) {
vTemas[this.DIML] = n;
this.DIML++;
} else {
System.out.println("El vector de temas esta lleno");
}
}
public void actuar() {
for (int i = 0; i < this.DIML; i++) {
System.out.println("Y ahora tocaremos... " + vTemas[i]);
}
}
public abstract int calcularCosto();
}