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
Get step-by-step solutions from verified subject matter experts
