aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--picker.java31
-rw-r--r--stock/Stock.classbin0 -> 1166 bytes
-rw-r--r--stock/Stock.java35
3 files changed, 36 insertions, 30 deletions
diff --git a/picker.java b/picker.java
index 4d12ac3..9710348 100644
--- a/picker.java
+++ b/picker.java
@@ -18,6 +18,7 @@
import java.lang.*;
import java.util.*;
+import stock.*;
class Backpointer {
static Stock NOTHING = new Stock(1, 0, "");
@@ -153,33 +154,3 @@ class Backpointer {
System.out.println("Total value: " + totalValue);
}
}
-
-class Stock {
- private int price, value;
- private 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;
- }
-
- @Override
- public String toString() {
- return "Ticker: " + ticker + " price: " + price + " value: " + value;
- }
-}
diff --git a/stock/Stock.class b/stock/Stock.class
new file mode 100644
index 0000000..e26d04e
--- /dev/null
+++ b/stock/Stock.class
Binary files differ
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;
+ }
+}