Commit 36d65426 authored by Rohit Prasad's avatar Rohit Prasad

Add Customer attribute to Trade class

parent 0c9d8735
...@@ -3,10 +3,12 @@ public abstract class Trade { ...@@ -3,10 +3,12 @@ public abstract class Trade {
float price; float price;
int time; int time;
String type; String type;
Customer c;
Trade(int qty, float price) { Trade(int qty, float price, Customer c) {
this.qty = qty; this.qty = qty;
this.price = price; this.price = price;
this.c = c;
} }
int getQty() { return qty; } int getQty() { return qty; }
...@@ -16,4 +18,6 @@ public abstract class Trade { ...@@ -16,4 +18,6 @@ public abstract class Trade {
int getTime() { return time; } int getTime() { return time; }
String getType() { return type; } String getType() { return type; }
Customer getCustomer() { return c; }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment