0

Hi every body

My teacher assinged us a lab to draw a 200 X 200 square at the top-left corner and the right bottom corner of the monitor then continue drawing squares that become steadily smaller as they are displayed to right side and left side of each preceding square. The bottom of the square stays at the same level. Each square is 25 percent smaller than the previously drawn square. The recursive process exits when it is true that either the square size becomes smaller than four pixels or the border of the monitor is reached.

The output shoud be similar to the picture at the end of the post

I am new to programming so please help me so I can start this program

Thank you in advance.

picture2

3
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by NormR1
0

make a method that calls itself by incrementing or decrementing the value passed to it

will you be using threads here for the repaint?

0

Start by writing a program that just creates one square.
Then look at how you can change it to make the next square.

0

I draw a sequare but I couldn't draw the next sequare which has to be 25% smaller
please help me

0

Post the code that shows how you are drawing the square. It's parameters should control how it is drawn.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.