diff options
| author | Kamal Wickramanayake <kamal@inbox.lk> | 2026-03-22 21:31:29 +0530 |
|---|---|---|
| committer | Kamal Wickramanayake <kamal@inbox.lk> | 2026-03-22 21:31:29 +0530 |
| commit | 5f5ac2c4ce62370257a26c5f15dbef577f4bc1c7 (patch) | |
| tree | 2b8cf5b2fdf9c8df124d4f8f64b33c876d1b55d2 /oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java | |
| parent | 3ffd9370c8c7ebf34232ef59568981cdc3856a05 (diff) | |
Deleted oop/10-point-of-sale since 11-point-of-sale has been added
Diffstat (limited to 'oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java')
| -rw-r--r-- | oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java b/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java deleted file mode 100644 index dfac6e1..0000000 --- a/oop/10-point-of-sale/src/lk/ac/pdn/ceit/pos/PointOfSale.java +++ /dev/null @@ -1,33 +0,0 @@ -package lk.ac.pdn.ceit.pos; - -import lk.ac.pdn.ceit.pos.entities.Bill; -import lk.ac.pdn.ceit.pos.entities.Item; -import lk.ac.pdn.ceit.pos.entities.LineItem; -import lk.ac.pdn.ceit.pos.item.ItemManager; - -public class PointOfSale { - - private ItemManager itemManager; - - private Bill bill; - - public PointOfSale(ItemManager itemManager) { - this.itemManager = itemManager; - } - - public Bill createNewBill() { - bill = new Bill(); - return bill; - } - - public void addLineItem(String itemId, int quantity) { - // From the ItemManager, get the Item. - Item item = itemManager.findById(itemId); - - // Create a new LineItem and associate it with the item returned - LineItem lineItem = new LineItem(item, quantity); - - // Add the new LineItem to the bill - bill.getLineItems().add(lineItem); - } -} |
