-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCoin.java
80 lines (72 loc) · 1.37 KB
/
Coin.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/**
* Constructor of coin object. Represents a cryptocurrency listed on an exchange
*
* @author AustinKRahmin
*
*/
public class Coin {
String exchange;
String asset;
double bid;
double ask;
/**
* Constructor of coin object
* @param exchange the exchange the cryptocurrency is listed on
* @param asset the name of the cryptocurrency
* @param bid the current bid price of the cryptocurrency on the given exchange
* @param ask the current ask price of the cryptocurrency on the given exchange
*/
public Coin(String exchange, String asset, double bid, double ask) {
this.exchange = exchange;
this.asset = asset;
this.bid = bid;
this.ask = ask;
}
/** Setter for exchange
*
* @param name exchange name
*/
public void setExchange(String name) {
this.exchange = name;
}
/** Setter for the coinname
*
*
* @param asset coin name
*/
public void setAsset(String asset) {
this.asset = asset;
}
/** Getter for the exchange
*
*
* @return exchange name
*/
public String getExchange() {
return exchange;
}
/** Getter for coin name
*
*
* @return asset's name
*/
public String getAsset() {
return asset;
}
/** Getter for bid price
*
*
* @return bid price
*/
public double getBidPrice() {
return bid;
}
/** Getter for ask price
*
*
* @return ask price
*/
public double getAskPrice() {
return ask;
}
}