-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArticle.java
More file actions
41 lines (32 loc) · 871 Bytes
/
Article.java
File metadata and controls
41 lines (32 loc) · 871 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
41
package produit;
public class Article {
protected String Code;
protected String Designation;
protected Double Prix;
protected Double TVA;
protected String Famille;
public Article(String Code, String Designation, Double Prix, Double TVA, String Famille) {
this.Code = Code;
this.Designation = Designation;
this.Prix = Prix;
this.TVA = TVA;
this.Famille = Famille;
}
@Override
public String toString() {
return "Article [Code=" + Code + ", Designation=" + Designation + ", Prix=" + Prix + ", TVA=" + TVA
+ ", Famille=" + Famille + "]";
}
public boolean memefamille (Article article){
return this.Famille.equals(article.Famille);
}
public double PrixTTC(){
return this.Prix * (1 + this.TVA);
}
public boolean equals(Article article){
return this.Code.equals(article.Code);
}
public String getCode(){
return this.Code;
}
}