added code

This commit is contained in:
buzz-lightsnack-2007 2024-02-25 01:23:28 +08:00
parent 739b598231
commit cad0dd1aad

View file

@ -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<String> items = new ArrayList<String>();
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);
};
};