Date: 05/08/07 (Code WTF) Keywords: no keywords
public abstract class Figure {
protected Point a = null;
protected Point b = null;
private Dot dotA = null;
private Dot dotB = null;
public Figure() {
a = new Point();
b = new Point();
}
public Dot getDotA() {
System.out.println(a); //DEBUG
dotA = new Dot(a.getX(), a.getY(), 25);
return dotA;
}
public Dot getDotB() {
dotB = new Dot(b.getX(), b.getY(), 25);
return dotB;
}
...
}
public class Dot extends Figure {
private int SIZE;
public Dot(double x, double y, int size) {
super();
this.SIZE = size;
}
...
}
PS Всё лишнее вырезал. PPS Может снабжать записи тегами? Хотя бы язык программирования указывать? Source: http://community.livejournal.com/code_wtf/84953.html
|