blob: 056e41e552edcd6be4e0b3528491e244ddfd79ac (
plain)
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
|
package lk.ac.pdn.ceit.pos;
import lk.ac.pdn.ceit.pos.entities.Bill;
public class TextUI {
private PointOfSale pos;
public TextUI(PointOfSale pos) {
this.pos = pos;
}
public void start() {
IO.println("POS Started.");
// Assume a bill should be created.
Bill bill = pos.createNewBill();
// Assume: Create a line item
pos.addLineItem("F001", 2);
pos.addLineItem("F002", 3);
// ...
// Print bill
}
}
|