diff options
Diffstat (limited to 'stock')
-rw-r--r-- | stock/Stock.class | bin | 0 -> 1166 bytes | |||
-rw-r--r-- | stock/Stock.java | 35 |
2 files changed, 35 insertions, 0 deletions
diff --git a/stock/Stock.class b/stock/Stock.class Binary files differnew file mode 100644 index 0000000..e26d04e --- /dev/null +++ b/stock/Stock.class diff --git a/stock/Stock.java b/stock/Stock.java new file mode 100644 index 0000000..a3d97c5 --- /dev/null +++ b/stock/Stock.java @@ -0,0 +1,35 @@ +package stock; + +public class Stock { + int price, value; + String ticker; + + public Stock() { + price = 0; + value = 0; + ticker = ""; + } + + public Stock(int price, int value, String ticker) { + this.price = price; + this.value = value; + this.ticker = ticker; + } + + public int getPrice() { + return price; + } + + public int getValue() { + return value; + } + + public String getTicker() { + return ticker; + } + + @Override + public String toString() { + return "Ticker: " + ticker + " price: " + price + " value: " + value; + } +} |