Created
August 18, 2008 15:06
-
-
Save claymccoy/5976 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final TreeNode shape = new TreeNode("shape"); | |
final TreeNode ellipse = new TreeNode("ellipse"); | |
shape.addChild(ellipse); | |
ellipse.addChild(new TreeNode("circle")); | |
final TreeNode polygon = new TreeNode("polygon"); | |
shape.addChild(polygon); | |
final TreeNode triangle = new TreeNode("triangle"); | |
polygon.addChild(triangle); | |
triangle.addChild(new TreeNode("equilateral")); | |
triangle.addChild(new TreeNode("isosceles")); | |
triangle.addChild(new TreeNode("scalene")); | |
final TreeNode quad = new TreeNode("quadrilateral"); | |
polygon.addChild(quad); | |
final TreeNode rectangle = new TreeNode("rectangle"); | |
quad.addChild(rectangle); | |
rectangle.addChild(new TreeNode("square")); | |
polygon.addChild(new TreeNode("petagon")); | |
polygon.addChild(new TreeNode("hexagon")); | |
polygon.addChild(new TreeNode("googolgon")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment