-
Notifications
You must be signed in to change notification settings - Fork 14
/
Commodity.cs
60 lines (54 loc) · 1.43 KB
/
Commodity.cs
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
using System;
namespace EliteDangerousTradingAssistant
{
public class Commodity
{
private string name;
private decimal buyPrice;
private decimal sellPrice;
private decimal supply;
private DateTime lastUpdated;
public string Name
{
get { return name; }
set { name = value; }
}
public decimal BuyPrice
{
get { return buyPrice; }
set { buyPrice = value; }
}
public decimal SellPrice
{
get { return sellPrice; }
set { sellPrice = value; }
}
public decimal Supply
{
get { return supply; }
set { supply = value; }
}
public DateTime LastUpdated
{
get { return lastUpdated; }
set { lastUpdated = value; }
}
public Commodity()
{
}
public Commodity(Commodity copy)
{
name = copy.Name;
buyPrice = copy.BuyPrice;
sellPrice = copy.SellPrice;
supply = copy.supply;
lastUpdated = copy.LastUpdated;
}
public bool Equals(Commodity compareTo)
{
if (name != compareTo.Name || buyPrice != compareTo.BuyPrice || sellPrice != compareTo.SellPrice || supply != compareTo.Supply)
return false;
return true;
}
}
}