1个回答
展开全部
import java.util.ArrayList;
import java.util.List;
public class Line {
/*
* x1 the first point's coordinate.
* y1 the first point's coordinate.
* x2 the second point's coordinate.
* y2 the second point's coordinate.
*/
private int x1;
private int y1;
private int x2;
private int y2;
private List<Line> lines =new ArrayList<Line>();
public Line() {}
public Line(int x1, int y1, int x2, int y2) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
public int getX1() {
return x1;
}
public void setX1(int x1) {
this.x1 = x1;
}
public int getY1() {
return y1;
}
public void setY1(int y1) {
this.y1 = y1;
}
public int getX2() {
return x2;
}
public void setX2(int x2) {
this.x2 = x2;
}
public int getY2() {
return y2;
}
public void setY2(int y2) {
this.y2 = y2;
}
public List<Line> Lines(){
return this.lines;
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询