Add getters and setters for CustomProduct

This commit is contained in:
Erik Hohlfeld 2023-11-10 18:34:45 +01:00 committed by Simon Bruder
parent de0fbc31dc
commit 94a03e2266
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -0,0 +1,33 @@
package catering.orderCatalog;
public class CustomProduct {
private static int itemIdCounter;
private int itemId;
private String name;
private int amount;
private double cost;
public CustomProduct(String name, int amount, double cost) {
this.itemId = itemIdCounter;
itemIdCounter++;
this.name = name;
this.amount = amount;
this.cost = cost;
}
public String getName() {
return name;
}
public int getAmount() {
return amount;
}
public double getCost() {
return cost;
}
public int getItemId() {
return itemId;
}
}