diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-03-15 16:33:18 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-03-15 16:33:18 +0530 |
| commit | ee94d753a9f87d0b46b3aad3d3cf855056562ad2 (patch) | |
| tree | f5673b4b806e92b1d98f1167700d49535bea8338 /oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/TextUI.java | |
| parent | 7c40224d014257f9112da2ffceda3a357beb69a9 (diff) | |
Additional classes related to POS.
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.java | 27 |
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 + } +} |
