-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDelayedPayment.java
More file actions
28 lines (21 loc) · 865 Bytes
/
DelayedPayment.java
File metadata and controls
28 lines (21 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package shopping;
import java.util.Date;
public class DelayedPayment extends Payment {
private Date paymentDate;
public DelayedPayment(int object_id, String id, Date paid, float total, String details, Date paymentDate) {
super(object_id, id, paid, total, details);
this.paymentDate = paymentDate;
}
public Date getPaymentDate() {
return paymentDate;
}
public void setPaymentDate(Date paymentDate) {
this.paymentDate = paymentDate;
}
@Override
public String toString() {
String fields = "DelayedPayment, id:" + id + ", Paid:" + paid + ", Total:" + total + ", Details:" + details + ", PaymentDate:" + paymentDate+ "\n";
String connected = "Connected to:" + account.getClass().getSimpleName() + ", " + order.getClass().getSimpleName();
return fields+connected;
}
}