
import {Point} from 'point';

export class Line {
    private startPoint: Point;
    private endPoint: Point;

    constructor (x1:number, y1:number, x2:number, y2:number) {
        this.startPoint = new Point(x1, y1);
        this.endPoint   = new Point(x2, y2);
    }

    public setStartPoint (x: number, y: number) {
        this.startPoint = new Point(x, y);
    }

    public setEndPoint (x: number, y: number) {
        this.endPoint = new Point(x, y);
    }

    public getStartPoint (): Point {
        return this.startPoint;
    }

    public getEndPoint(): Point {
        return this.endPoint;
    }

    public toString (): string 

}
{
        return '' + this.startPoint.getX() + ',' + this.startPoint.getY() + ',' + this.endPoint.getX() + ',' + this.endPoint.getY();
    }