interface LoA{ } class EmptyLoA implements LoA{ EmptyLoA(){ } } class ConsLoA implements LoA{ Animal first; LoA rest; ConsLoA(Animal first, LoA rest){ this.first = first; this.rest = rest; } } interface Animal{ } class Bear implements Animal{ String name; String eats; int weight; Bear(String name, String eats, int weight){ this.name = name; this.eats = eats; this.weight = weight; } } class Snake implements Animal{ String name; int length; boolean poisonous; Snake (String name, int length, boolean poisonous){ this.name = name; this.length = length; this.poisonous = poisonous; } } class Spider implements Animal{ String name; int legs; boolean poisonous; Spider(String name, int legs, boolean poisonous){ this.name = name; this.legs = legs; this.poisonous = poisonous; } } class Examples{ Examples(){ } Animal spidy = new Spider("Spidy", 8, false); Animal smoky = new Bear("Smoky", "rodents", 1200); LoA empty = new EmptyLoA(); LoA oneAni = new ConsLoA(this.spidy, this.empty); LoA threeAni = new ConsLoA(this.spidy, new ConsLoA(this.smoky, new ConsLoA(new Snake("Slim", 20, true), this.empty))); }