Skip to content

Commit

Permalink
"Todo ordenado"
Browse files Browse the repository at this point in the history
  • Loading branch information
FacuGerez committed Apr 7, 2023
1 parent bfbfded commit ca06626
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/Activities.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
import java.util.ArrayList;

public abstract class Activities {
//--------- Atributos ---------
enum tipo {TAREA,EVENTO}
protected final String name;
protected final String description;
protected ArrayList<LocalDateTime> alarm;
protected final boolean isComplete;
//--------- Atributos ---------
//--------- Constructores ---------
public Activities(String name, String description, ArrayList<LocalDateTime> alarm, boolean isComplete) {
this.name = name;
this.description = description;
Expand All @@ -18,6 +21,8 @@ public Activities(String name, String description, boolean isComplete) {
this.description = description;
this.isComplete = isComplete;
}
//--------- Constructores ---------
//--------- Metodos ---------
public abstract tipo type();
public abstract LocalDateTime cuandoTermina();
public abstract LocalDateTime cuandoEmpieza();
Expand All @@ -30,4 +35,5 @@ public String getDescripcion() {
public boolean esDiaEntero() {
return isComplete;
}
//--------- Metodos ---------
}
6 changes: 6 additions & 0 deletions src/main/java/Evento.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
import java.util.ArrayList;

public class Evento extends Activities {
//--------- Atributos ---------
private LocalDateTime arranque;
private LocalDateTime termina;
//--------- Atributos ---------
//--------- Constructores ---------
public Evento(String name, String description, ArrayList<LocalDateTime> alarm, boolean isComplete, LocalDateTime arranque, LocalDateTime termina) {
super(name, description, alarm, isComplete);
this.arranque = arranque;
this.termina = termina;
}
//--------- Constructores ---------
//--------- Metodos ---------
@Override
public tipo type() {
return tipo.EVENTO;
Expand All @@ -21,4 +26,5 @@ public LocalDateTime cuandoEmpieza(){
public LocalDateTime cuandoTermina() {
return this.termina;
}
//--------- Metodos ---------
}

0 comments on commit ca06626

Please sign in to comment.