ASSIGNMENT:
Draw this leaf pattern. Use the recursive method shown below if you can...
otherwise do it your own way (using draw methods).
public void drawLeafs(Graphics g, int len, int b){
int top=b-10;
g.drawLine(r,b,r+len,b);
g.drawLine(r,top,r+len,top);
g.drawLine(l,b,l-len,b);
g.drawLine(l,top,l-len,top);
g.drawArc(r+len-5, top, 10, 10, 270, 180);
g.drawArc(l-len-5, top, 10, 10, 90, 180);
len=len-10;
if(len>10) drawLeafs(g,len,top);
else drawTop(g,top);
}
You will have to figure out the drawTop method on your own if you decide to
use this code.