diff options
author | Michael Hunteman <michael@michaelted.xyz> | 2022-09-11 15:34:45 -0500 |
---|---|---|
committer | Michael Hunteman <michael@huntm.net> | 2023-03-07 11:06:52 -0600 |
commit | 0f0dd310089e760841ce22ec2ab173dac94c71d2 (patch) | |
tree | 3c9d995ad2ceef669cdc0bec12a9a0089e6d5740 /stock | |
parent | 800fc1664c94fd543151adf25bb2ce2e5a2f6c21 (diff) |
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; + } +} |