I have no idea how to get started with this project on recursion.
Here is the starting code -
import java.awt.;
import java.applet.;
public class Lab10vst extends Applet
{
public void paint (Graphics g)
{
drawSquare1(g,1024,768);
}
public void drawSquare1(Graphics g, int maxX, int maxY)
{
int midX = maxX/2;
int midY = maxY/2;
int startWidth = maxX/4;
int startHeight = maxY/4;
int tlX = midX - (startWidth/2);
int tlY = midY - (startHeight/2);
g.fillRect(tlX,tlY,startWidth,startHeight);
}
public void delay(long n)
{
n *= 1000;
long startDelay = System.nanoTime();
long endDelay = 0;
while (endDelay - startDelay < n)
endDelay = System.nanoTime();
}
}
I need the Output to be a colored fractal as shown. Please Help me ASAP /help
#Java Lab Help
8 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @fallen mountain! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
<@&765578700724371486>
Requested by firespeed#4146
format the code given in java
Well do you know what recursion is? Understanding that might be a good start
he doesn't use recursion here, or am I blind?
Well based on their first statement it seems like that's what they need to use