Cir cir = new Cir();
Rec rec = new Rec();
Tri tri = new Tri();
void setup(){
canvas.addFigure(cir);
}
void draw(){
}
int x,y;
ArrayList<Figure> fig;
x = xpos;
y = ypos;
}
void addFigure(Figure f){
fig.add(f);
}
void display(){
for(Figure f:fig){
f.display();
}
}
}
class Cir extends Figure{
Cir(){
}
boolean overPeriphery(){
return true;
}
void clicked(){
}
void display(){
}
}
Q2FudmFzIGNhbnZhczsKQ2lyIGNpciA9IG5ldyBDaXIoKTsKUmVjIHJlYyA9IG5ldyBSZWMoKTsKVHJpIHRyaSA9IG5ldyBUcmkoKTsKCnZvaWQgc2V0dXAoKXsKICBjYW52YXMuYWRkRmlndXJlKGNpcik7Cn0KCnZvaWQgZHJhdygpewp9CgpjbGFzcyBDYW52YXN7CiAgaW50IHgseTsKICBBcnJheUxpc3Q8RmlndXJlPiBmaWc7CiAgQ2FudmFzKGludCB4cG9zLCBpbnQgeXBvcyl7CiAgICB4ID0geHBvczsKICAgIHkgPSB5cG9zOwogIH0KICAKICB2b2lkIGFkZEZpZ3VyZShGaWd1cmUgZil7CiAgICBmaWcuYWRkKGYpOwogIH0KICAKICB2b2lkIGRpc3BsYXkoKXsKICAgIGZvcihGaWd1cmUgZjpmaWcpewogICAgICBmLmRpc3BsYXkoKTsKICAgIH0KICB9Cn0KCmNsYXNzIENpciBleHRlbmRzIEZpZ3VyZXsKICBDaXIoKXsKICB9CiAgYm9vbGVhbiBvdmVyUGVyaXBoZXJ5KCl7CiAgICByZXR1cm4gdHJ1ZTsKICB9CiAgdm9pZCBjbGlja2VkKCl7CiAgfQogIHZvaWQgZGlzcGxheSgpewogIH0KfQ==
Main.java:1: class, interface, or enum expected
Canvas canvas;
^
Main.java:2: class, interface, or enum expected
Cir cir = new Cir();
^
Main.java:3: class, interface, or enum expected
Rec rec = new Rec();
^
Main.java:4: class, interface, or enum expected
Tri tri = new Tri();
^
Main.java:6: class, interface, or enum expected
void setup(){
^
Main.java:8: class, interface, or enum expected
}
^
6 errors