summaryrefslogtreecommitdiff
path: root/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java
diff options
context:
space:
mode:
Diffstat (limited to 'oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java')
-rw-r--r--oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java b/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java
new file mode 100644
index 0000000..056e41e
--- /dev/null
+++ b/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java
@@ -0,0 +1,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
+ }
+}