From cad0dd1aad8ac426723f8ed9c8568f03bd2ae603 Mon Sep 17 00:00:00 2001 From: buzz-lightsnack-2007 <73412182+buzz-lightsnack-2007@users.noreply.github.com> Date: Sun, 25 Feb 2024 01:23:28 +0800 Subject: [PATCH] added code --- .../tech/iBeans/POSware/Lite/transaction.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/main/java/tech/iBeans/POSware/Lite/transaction.java diff --git a/src/main/java/tech/iBeans/POSware/Lite/transaction.java b/src/main/java/tech/iBeans/POSware/Lite/transaction.java new file mode 100644 index 0000000..05eeb69 --- /dev/null +++ b/src/main/java/tech/iBeans/POSware/Lite/transaction.java @@ -0,0 +1,32 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package tech.iBeans.POSware.Lite; + +import java.util.*; + +/** + * + * @author eleven + */ +public class transaction { + // The current transaction item + public static ArrayList items = new ArrayList(); + public static int items_count = items.size(); + + public static boolean add(String SKU, int QUANTITY) { + /* Add an item to the shopping cart. + Parameters: + SKU (String): the SKU of the item + QUANTITY (int): the quantity + Returns: (boolean) the add state + */ + + items.add(SKU); + + return(true); + }; + + +}; \ No newline at end of file