// generated by Dynamator Wed Mar 31 19:16:32 CST 2004 import java.io.PrintWriter; public class Taxonomy { private static class Element { private String name_; private Element[] children_ = {}; public Element( String name ) { name_ = name; } public Element( String name, Element[] children ) { name_ = name; children_ = children; } public String name() { return name_; } public Element[] children() { return children_; } } private static Element root = new Element("Animals", new Element[] { new Element("Vertebrates", new Element[] { new Element("Warm-blooded", new Element[] { new Element("Mammals"), new Element("Birds") } ), new Element("Cold-blooded", new Element[] { new Element("Fish"), new Element("Reptiles") } ) } ), new Element("Invertebrates", new Element[] { new Element("Arthropods", new Element[] { new Element("Crustaceans"), new Element("Insects") } ) } ) } ); private static interface ElementOutputter { void output( Element element ); } public static void main(String[] args) { PrintWriter out = new PrintWriter(System.out); print(out, root); out.flush(); } private static void print( final PrintWriter out, Element element ) { out.write("\n"); out.write("\n"); out.write(" \n"); out.write(" Taxonomy\n"); out.write(" \n"); out.write(" \n"); out.write("

"); out.write(String.valueOf("An Informal Taxonomy of the Animal Kingdom")); out.write("

\n"); out.write("

"); out.write(String.valueOf(element.name())); out.write("

\n"); ElementOutputter elementOutputter = new ElementOutputter() { public void output( Element element ) { out.write(" "); } }; elementOutputter.output(element); out.write("\n"); out.write("\n"); } }