Commit be0f60d7 authored by Rohit Prasad's avatar Rohit Prasad

Add toString() method

parent ea8d383e
......@@ -12,4 +12,9 @@ public class Customer {
return this.id.equals(c.getId());
}
@Override
public String toString() {
return id;
}
}
......@@ -67,4 +67,10 @@ public abstract class Order {
&& this.c.equals(t.getCustomer()) && this.stock.equals(t.getStock())
&& this.qty == t.getQty() && this.price == t.getPrice();
}
@Override
public String toString() {
return "<" + time + "," + type + "," + c + "," + stock + "," +
qty + "," + price + ">";
}
}
......@@ -12,4 +12,9 @@ public class Stock {
return this.name.equals(s.getName());
}
@Override
public String toString() {
return name;
}
}
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