mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add getters and setters for CustomProduct
This commit is contained in:
parent
de0fbc31dc
commit
94a03e2266
33
src/main/java/catering/orderCatalog/CustomProduct.java
Normal file
33
src/main/java/catering/orderCatalog/CustomProduct.java
Normal 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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue