-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPropertyCard.java
59 lines (54 loc) · 1.17 KB
/
PropertyCard.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
57
58
59
public class PropertyCard {
private String name;
private int cost;
private int rent;
private boolean _isOwned;
private int _ownedBy;
private String nameOwnedBy;
public PropertyCard() {
name = "";
cost = -1;
rent = -1;
_isOwned = false;
_ownedBy = -1;
nameOwnedBy = "";
}
public PropertyCard(String name, int cost, int rent, boolean _isOwned, int _ownedBy) {
this.name = name;
this.cost = cost;
this.rent = rent;
this._isOwned = false;
this._ownedBy = -1;
}
public String getName() {
return name;
}
public int getCost() {
return cost;
}
public int getRent() {
return rent;
}
public String getOwnedBy() {
return nameOwnedBy;
}
public boolean isOwned() {
return _isOwned;
}
public int ownedBy() {
return _ownedBy;
}
public void setOwnedBy(int n) {
_ownedBy = n;
}
public void setNameOwnedBy(String s) {
nameOwnedBy = s;
}
public void setIsOwned(boolean b) {
_isOwned = b;
}
public String toString() {
String temp = "Card name: " + name + "\nCard Cost: " + cost + "\nCard rent: " + rent + "\nisOwned: " + _isOwned + "\nOwnedBy: " + _ownedBy + "\n";
return temp;
}
}