feat: initial functional release of Stock Pignon

This commit is contained in:
2026-01-14 18:42:53 +01:00
commit 4dcb0b1b5a
106 changed files with 2147 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
// CartItem.java
package com.stock.pignon;
public class CartItem {
private final String name;
private final int minPrice;
private final int maxPrice;
private int quantity;
private final String imageFile; // Image name without extension
public CartItem(String name, int minPrice, int maxPrice, int quantity, String imageFile) {
this.name = name;
this.minPrice = minPrice;
this.maxPrice = maxPrice;
this.quantity = quantity;
this.imageFile = imageFile;
}
public String getName() { return name; }
public int getMinPrice() { return minPrice; }
public int getMaxPrice() { return maxPrice; }
public int getQuantity() { return quantity; }
public void setQuantity(int quantity) { this.quantity = quantity; }
public int getTotalMin() { return minPrice * quantity; }
public int getTotalMax() { return maxPrice * quantity; }
public String getImageFile() { return imageFile; }
}