Objective:To gain experience using recursion.## The Scenario.

When we doodle, those of us who are less than gifted artistically often resort to making simple geometric patterns on the backs of our notebooks, envelopes, napkins or whatever. One of the all-time favorites is to draw smaller and smaller copies of a single shape inside of another. For example, one can take a shape like a triangle or rectangle and then divide it up into smaller shapes (perhaps by drawing lines between midpoints of adjacent sides) and then divide each of the new regions and so on until all you have is a big blob of ink on the paper. Fortunately, Java's drawing resolution is good enough that if we get it to do this kind of doodling, we can produce things quite a bit more interesting than a big blob. For example, repeatedly dividing triangles into smaller triangles can lead to a picture like that shown below.

For this lab, you will write two programs that utilize recursive structures to draw such diagrams.

- Triangulate.java --- Recursive triangle doodle WindowController class.
- TriangleDoodle.java --- Template .java file given to students for triangle doodle interface.
- EmptyTriangleDoodle.java --- Template .java file given to students for triangle doodle base class.
- ComplexTriangleDoodle.java --- Template .java file given to students for recursive case triangle doodle class.
- StairController.java --- Recursive variegated stairs WindowController class.
- StairsInterface.java --- Template .java file given to students for variegated stairs interface.
- EmptyStairs.java --- Template .java file given to students for variegated stairs base class.
- VariegatedStairs.java --- Template .java file given to students for recursive case variegated stairs class.