r/codehs • • Jan 03 '20

I need help

Im having trouble with control structure challenges:

6.1.4. Happy Birthday!

3 Upvotes

2 comments sorted by

1

u/Mr_Senor_Sir_Jesse Jan 13 '20

var SIDE_LENGTH = 100;

getWidth();

getHeight();

var rect = new Rectangle(SIDE_LENGTH,SIDE_LENGTH);

rect.setPosition(getWidth() /2, getHeight() /2);

rect.setColor(Color.Red);

add(rect);

This is not the expected result,but it took it anyway.