Skip to content
Snippets Groups Projects
MenuPotage.java 599 B
Newer Older
benjamin.sitbon's avatar
benjamin.sitbon committed


public class MenuPotage extends Menu {


    public void add(Legume l){
        LegumePotage pot = (LegumePotage) l;
        this.menu.add(pot);
    }

    public void add(Herbe he){
        HerbePotage pot = (HerbePotage) he;
        this.menu.add(pot);
    }

    public void add(Huile hu){
        HuilePotage pot = (HuilePotage) hu;
        this.menu.add(pot);
    }


    public void addAll(Ingredient... ingredients){
        for(Ingredient l: ingredients){
            this.menu.add(l);
        }
    }
    public Ingredient get(int index){
        return this.menu.get(index);
    }
    
}