Hello,
I have three classes: Circle, Canvas and GameBoard.
When I try to compile this I get the error
'cannot resolve symbol - constructor Circle(int,int,java.lang.string)'
I noticed if I delete the parameters of the Circle it will compile. Please could anyone tell me why it doesnt understand the parameters?
Do the parameters have to be clearly declared the same in the Circle class?
Below are the Gameboard and Circle classes.
Thanks
stevetook
GameBoard class:
import java.util.ArrayList;
public class GameBoard
{
private ArrayList locations;
public GameBoard()
{
locations = new ArrayList();
locations.add(new Circle(130,50,"black"));
locations.add(new Circle(140,50,"black"));
}
}
Circle class:
import java.awt.*;
import java.awt.geom.*;
public class Circle
{
private int diameter;
private int xPosition;
private int yPosition;
private String color;
private boolean isVisible;
public Circle()
{
diameter = 30;
xPosition = 20;
yPosition = 60;
color = "blue";
isVisible = false;
}
public void makeVisible()
{
isVisible = true;
draw();
}