public class MenuSalades extends Menu { public void add(Legume l){ LegumeSalades sal = (LegumeSalades) l; this.menu.add(sal); } public void add(Herbe he){ HerbeSalades sal = (HerbeSalades) he; this.menu.add(sal); } public void add(Huile hu){ HuileSalades sal = (HuileSalades) hu; this.menu.add(sal); } public void addAll(Ingredient... ingredients){ for(Ingredient l: ingredients){ this.menu.add(l); } } public Ingredient get(int index){ return this.menu.get(index); } }