-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAmazonRecord.java
More file actions
43 lines (34 loc) · 897 Bytes
/
AmazonRecord.java
File metadata and controls
43 lines (34 loc) · 897 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package visitor;
import visitor.exporter.Exportable;
import visitor.exporter.Exporter;
import java.util.Date;
public class AmazonRecord implements Exportable {
private final long amount;
private final Date date;
private final long points;
public AmazonRecord(long amount, Date date, long points) {
this.amount = amount;
this.date = date;
this.points = points;
}
public long getAmount() {
return amount;
}
public Date getDate() {
return date;
}
public long getPoints() {
return points;
}
@Override
public String toString() {
return "AmanzonRecord{" +
"amount=" + amount +
", date=" + date +
", points=" + points +
'}';
}
public String export(Exporter exporter) {
return exporter.export(this);
}
}