/*
 * "Grundkurs Programmieren in Java - Band 2 (2. Auflage, 2006)I"
 * 2003-2006, Carl Hanser Verlag
 * Loesungsvorschlag zu Aufgabe 9.2 (Version 2.0)
 * (c) 2003-2006 D. Ratz, J. Scheffler, D. Seese, J. Wiesenberger
 *
 */

import java.awt.*;

public class Strecke implements GeoObjekt {
  
  private Punkt p, q;
  
  public Strecke(Punkt p, Punkt q) {
    this.p = p;
    this.q = q;
  }
  
  public void drehen(double phi) {
    p.drehen(phi);
    q.drehen(phi);
  }
  
  public void zeichnen(Graphics g, int xNull, int yNull) {
    g.drawLine( xNull + (int) this.p.getX(),
                yNull + (int) this.p.getY(),
                xNull + (int) this.q.getX(),
                yNull + (int) this.q.getY() );
  }
}
