2
public class Picture
{
private Square s1;
private Square s2;
private Square s3;
private Square s4;
private Square s5;
private Square s6;
private Square s7;
private Square s8;
private Square s9;
/**
* Constructor for objects of class Picture
*/
public Picture()
{
// nothing to do... instance variables are automatically set to null
}
/**
* Draw this picture.
*/
public void draw()
{
s1 = new Square(23,87,104,"red",true);
s2 = new Square(23,112,104,"yellow",true);
s3 = new Square(23,137,104,"magenta",true);
s4 = new Square(23,87,129,"blue",true);
s5 = new Square(23,112,129,"green",true);
s6 = new Square(23,137,129,"yellow",true);
s7 = new Square(23,87,154,"magenta",true);
s8 = new Square(23,112,154,"red",true);
s9 = new Square(23,137,154,"blue",true);
}
}
我不得不爲類創建rubix多維數據集,似乎無法使其工作。我不斷收到錯誤:找不到符號 - 構造函數(java)
cannot find symbol - constructor Square(int,int,int,java.lang.String,boolean)
有沒有人看到我要去哪裏錯了?請幫忙