|
public class SandwhichTester
{
public static void main(String[]
args)
{
Sandwhich s1 = new Sandwhich("Club house", 4, "triangles", "savoury", "sourdough", "bacon, tomatoes, turkey & lettuce", "mayo");
System.out.println(s1);
System.out.println("*****");
System.out.println("LUNCH MENU");
Food[] lunch
= new Food[5];
lunch[0] = s1;
lunch[1] = new Sandwhich("PB&J", 2, "halves", "sweet", "white", "", "peanut butter & jam");
lunch[2] = new Food("Soup", 2, "cups", "savoury");
lunch[3] = new Food("Soda crackers", 4, "pieces", "savoury");
lunch[4] = new Food("Carrots", 5, "sticks", "sweet");
for (int i = 0; i < lunch.length; i++)
{
System.out.println(lunch[i]);
}
}
}
|