I just need a basic skeleton of code for this. I'm very new to programming so I have almost no experience, and have been working on this for quite a while. This is what I have, and I need some guidance:
/**
* Creates stars to be displayed on the background image.
* The parameter shows the number of stars on the background image.
*/
public void createStars(int number)
{
GreenfootImage background = getBackground();
for(int i = 0; i < number; i++)
{
int x = Greenfoot.getRandomNumber(300);
int y = Greenfoot.getRandomNumber(300);
GreenfootImage image = new GreenfootImage(2, 2);
image.setColor(Color.WHITE);
image.fillOval(2, 2, x, y);
setBackground(image);
}
}
}

