-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathBill.java
More file actions
28 lines (23 loc) · 727 Bytes
/
Bill.java
File metadata and controls
28 lines (23 loc) · 727 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
import java.time.LocalDate;
public class Bill {
private int id;
private double price;
// private Order order;
private LocalDate date;
// public Bill(int id, double price, Order order) {
// this.id = id;
// this.price = price;
// this.order = order;
// date = LocalDate.now();
// }
public String transcript() {
StringBuilder transcript = new StringBuilder();
transcript.append("ID of transaction: ");
transcript.append(id + "\n");
transcript.append("Price: ");
transcript.append(price + "\n");
transcript.append("Order ID: ");
// transcript.append(order.getId + "\n");
return transcript.toString();
}
}