- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCard.java
More file actions
Latest commit
41 lines (34 loc) · 726 Bytes
/
Copy pathCard.java
File metadata and controls
41 lines (34 loc) · 726 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
packageprog2.tp2;
/**
* Created by Martin Gutierrez.
* User: Martin
* Date: 19/08/11
* Time: 23:01
*/
publicclassCard {
privateintsuit;
privateintnumber;
privateintvalue;
Card(intsuit, intnumber, intvalue) {
this.suit = suit;
this.number = number;
this.value = value;
}
Card(intsuit, intnumber) {
this.suit = suit;
this.number = number;
this.value = 0;
}
publicintgetSuit() {
returnsuit;
}
publicintgetNumber() {
returnnumber;
}
publicvoidsetValue(intvalue) {
this.value = value;
}
publicStringtoString() {
returngetNumber() + "de" + getSuit();
}
}