Question: Given this methode, public static void drawFlag(int stars, int stripes, java.awt.Graphics g, int x, int y, int width, int height) If I do, drawFlag(15,13,g,0,0,width/2,height/2) I

Given this methode,

public static void drawFlag(int stars, int stripes, java.awt.Graphics g, int x, int y, int width, int height)

If I do, drawFlag(15,13,g,0,0,width/2,height/2)

I will have 15 stars to draw on the flag...

Then, I made an algorithm to find a rectangular grid which I can draw stars in.

I will use 5 colums by 3 rows for the stars.

To draw stars, I will use drawStar(g,x,y,size)

Now using the nested for loops, How can i draw the stars ? given that I already know the size of the star.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!