-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComposition.java
56 lines (41 loc) · 1.44 KB
/
Composition.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
50
51
52
53
54
55
56
package tp5;
public class Composition {
private int refComposition;
private double quantiteComposition;
private String refRecette;
private String refIngredient;
public Composition(int refComposition, double quantiteComposition, String refRecette, String refIngredient) {
this.refComposition = refComposition;
this.quantiteComposition = quantiteComposition;
this.refRecette = refRecette;
this.refIngredient = refIngredient;
}
// Getters and setters
public int getRefComposition() {
return refComposition;
}
public void setRefComposition(int refComposition) {
this.refComposition = refComposition;
}
public double getQuantiteComposition() {
return quantiteComposition;
}
public void setQuantiteComposition(double quantiteComposition) {
this.quantiteComposition = quantiteComposition;
}
public String getRecette() {
return refRecette;
}
public void setRecette(String recette) {
this.refRecette = recette;
}
public String getIngredient() {
return refIngredient;
}
public void setIngredient(String ingredient) {
this.refIngredient = ingredient;
}
public String toString() {
return"le ref du Composition: "+getRefComposition()+" ,la quantité: "+getQuantiteComposition()+",pour la Recette: "+getRecette();
}
}