Commit a9768b27 authored by Rohit Prasad's avatar Rohit Prasad

Add constructor to create object with argument of class Order

parent 671505e4
...@@ -20,6 +20,15 @@ public abstract class Order { ...@@ -20,6 +20,15 @@ public abstract class Order {
this.stock = stock; this.stock = stock;
} }
Order(Order o) {
this.qty = o.getQty();
this.price = o.getPrice();
this.c = o.getCustomer();
this.time = o.getTime();
this.type = o.getType();
this.stock = o.getStock();
}
int getQty() { return qty; } int getQty() { return qty; }
float getPrice() { return price; } float getPrice() { return price; }
......
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