Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started