You need to sign in or sign up before continuing.
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 {
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; }
float getPrice() { return price; }
......@@ -33,7 +42,7 @@ public abstract class Order {
Stock getStock() { return stock; }
void setQty(int qty) { this.qty = qty; }
@Override
public boolean equals(Object o) {
// self check
......
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