I need help i became a task from my teacher and I dont know how to do it, can u help me ?
Here is the task:
Now create five Squares objects with a while loop, the size of which starts at 50 and decreases by 10 and which are placed from bottom left to top right.
My current code is this:
private void Prepare() {
int h = 1;
int x = 300;
int y = 400;
addObject(new Squares(false), 100,100);
addObject(new Squares(true), 700,500);
while (h < 6) {
addObject(new Squares(true), x, y);
x = x + 50;
y = y - 50;
h++;
}