-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTache.java
More file actions
96 lines (70 loc) · 2.44 KB
/
Tache.java
File metadata and controls
96 lines (70 loc) · 2.44 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
// Cette classe contiens les informations d'une tache
// Cette classe n'est pas encore finie (il manque les méthodes)
import java.io.Serializable;
import java.time.Duration;
import java.time.LocalDate;
public abstract class Tache implements Serializable {
private String nom;
private Duration duree;
private Priorite priorite;
private LocalDate dateLimite; // Dans ce projet , la limite est une date et non une heure
private Categorie categorie;
private Etat etat;
public Tache(String nom, Duration duree, Priorite priorite, LocalDate dateLimite, Categorie categorie, Etat etat) {
this.nom = nom;
this.duree = duree;
this.priorite = priorite;
this.dateLimite = dateLimite;
this.categorie = categorie;
this.etat = etat;
}
public String getNom() {
return nom;
}
// -------------------------------------- Delimitation Setters/Getters --------------------------------------
public Etat getEtat() {
return etat;
}
public void setEtat(Etat etat) {
this.etat = etat;
}
public void setNom(String nom) {
this.nom = nom;
}
public Duration getDuree() {
return duree;
}
public void setDuree(Duration duree) {
this.duree = duree;
}
public Priorite getPriorite() {
return priorite;
}
public void setPriorite(Priorite priorite) {
this.priorite = priorite;
}
public LocalDate getDateLimite() {
return dateLimite;
}
public void setDateLimite(LocalDate dateLimite) {
this.dateLimite = dateLimite;
}
public Categorie getCategorie() {
return categorie;
}
public void setCategorie(Categorie categorie) {
this.categorie = categorie;
}
// -------------------------------------- Delimitation Setters/Getters --------------------------------------
abstract boolean isDecomposable(); // Retourne vrai si la tache est décomposable , faux sinon
// Cette méthode affiche les informations d'une tache
public void afficher(){
System.out.println("Nom : "+nom);
System.out.println("Durée : "+duree);
System.out.println("Priorité : "+ priorite);
System.out.println("Date limite : "+dateLimite);
System.out.println("Catégorie : "+categorie);
System.out.println("Etat : "+etat);
System.out.println("Est décomposable : "+isDecomposable());
};
}