Research Article
Application-Level Unsupervised Outlier-Based Intrusion Detection and Prevention
Code 1
An e-commerce application example.
public class Checkout | public void process(ShoppingCartshoppingCart) throws Exception | //implementation | | | public class ShoppingCart | private User user; | private ArrayList<SelectedProduct> selectedProducts; | private float totalPriceWithoutTax; | private float tax; | private float totalWeight; | //more code... | | public class SelectedProduct | private Product product; | private intselectedQuantity; | //more code... | | public class Product | private int id; | private String barcode; | private String name; | private String category; | private float priceWithoutTax; | private flottaxRate; | private float discount; | private float weight; | private HashMap<String, String> characteristics; | //more code... | | public class User | private int id; | private String fullName; | private String address; | //more code... | |
|