Commit 6f88215f authored by Antoine Hazebrouck's avatar Antoine Hazebrouck
parents 7d1e0678 09fece05
Pipeline #2877 canceled with stages
package imt.ingredients;
public class Autre extends Ingredient {
private int calories;
private boolean bio;
public Autre(int idIngredient, String nomIngredient, int calories, boolean bio) {
super(idIngredient, nomIngredient);
this.calories = calories;
this.bio = bio;
}
public int getCalories() {
return calories;
}
public void setCalories(int calories) {
this.calories = calories;
}
public boolean getBio() {
return bio;
}
public void setBio(boolean bio) {
this.bio = bio;
}
public String toString() {
return "Autre [calories=" + calories + ", bio=" + bio + ", idIngredient=" + getIdIngredient() + ", nomIngredient=" + getNomIngredient() + "]";
}
}
package imt.ingredients;
public class Epice extends Ingredient{
private Boolean bio;
public Epice(int idIngredient, String nomIngredient, Boolean bio) {
super(idIngredient, nomIngredient);
this.bio = bio;
}
public Boolean getBio() {
return bio;
}
public void setBio(Boolean bio) {
this.bio = bio;
}
public String toString() {
return "Epice [bio=" + bio + ", idIngredient=" + getIdIngredient() + ", nomIngredient=" + getNomIngredient() + "]";
}
}
package imt.ingredients;
public class Ingredient {
private int idIngredient;
private String nomIngredient;
public Ingredient(int idIngredient, String nomIngredient) {
this.idIngredient = idIngredient;
this.nomIngredient = nomIngredient;
}
public int getIdIngredient() {
return idIngredient;
}
public void setIdIngredient(int idIngredient) {
this.idIngredient = idIngredient;
}
public String getNomIngredient() {
return nomIngredient;
}
public void setNomIngredient(String nomIngredient) {
this.nomIngredient = nomIngredient;
}
public String toString() {
return "Ingredient [idIngredient=" + idIngredient + ", nomIngredient=" + nomIngredient + "]";
}
}
package imt.ingredients;
public class Legume extends Ingredient{
private int calories;
private boolean bio;
public Legume(int idIngredient, String nomIngredient, int calories, boolean bio) {
super(idIngredient, nomIngredient);
this.calories = calories;
this.bio = bio;
}
public int getCalories() {
return calories;
}
public void setCalories(int calories) {
this.calories = calories;
}
public boolean getBio() {
return bio;
}
public void setBio(boolean bio) {
this.bio = bio;
}
public String toString() {
return "Legume [calories=" + calories + ", bio=" + bio + ", idIngredient=" + getIdIngredient() + ", nomIngredient=" + getNomIngredient() + "]";
}
}
package imt.ingredients;
public class ViandePoisson extends Ingredient{
private int calories;
private int gras;
public ViandePoisson(int idIngredient, String nomIngredient, Boolean bio) {
super(idIngredient, nomIngredient);
}
public int getCalories() {
return calories;
}
public void setCalories(int calories) {
this.calories = calories;
}
public int getGras() {
return gras;
}
public void setGras(int gras) {
this.gras = gras;
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment