added pop up view ingredients + warnings for delete

This commit is contained in:
Aysegul 2026-01-09 21:42:57 +01:00
commit 9aae8f918f
9 changed files with 574 additions and 17 deletions

View file

@ -62,6 +62,8 @@ public class Ingredient {
this.carbsPer100g = carbsPer100g;
}
public double kcalPer100g() {
return proteinPer100g * KCAL_PER_GRAM_PROTEIN
+ carbsPer100g * KCAL_PER_GRAM_CARBS
@ -92,6 +94,10 @@ public class Ingredient {
return name;
}
public void setName(String name){
this.name = name;
}
@Override
public boolean equals(Object o) {
if (o == null || getClass() != o.getClass()) return false;