Compare commits

..

No commits in common. "3bd5464fe6e7180c75fdd088c353c5b9ffee9ffe" and "d8cd96b96c4e888b9ef2fa32ce960d64ad21297b" have entirely different histories.

5 changed files with 6 additions and 45 deletions

View File

@ -19,12 +19,4 @@ public class Gerade
m = (P1.y - P2.y)/(P1.x - P2.x);
c = P1.y - m * P1.x;
}
public Punkt schneide (Gerade h){
double x = (h.c - c ) / (m - h.m);
double y = m * x + c;
return new Punkt(x, y);
}
public String toString(){
return "y = " + m + " * x + " + c;
}
}

View File

@ -1,6 +0,0 @@
public class Person
{
String Vorname;
String Nachname;
}

View File

@ -1,4 +1,10 @@
/**
* Beschreiben Sie hier die Klasse Punkt.
*
* @author (Ihr Name)
* @version (eine Versionsnummer oder ein Datum)
*/
public class Punkt
{
double x;
@ -13,7 +19,4 @@ public class Punkt
x = x + _x;
y = y + _y;
}
public String toString(){
return "P(" + x + "|" + y + ")";
}
}

View File

@ -1,11 +0,0 @@
/**
* Beschreiben Sie hier die Klasse Schüler.
*
* @author (Ihr Name)
* @version (eine Versionsnummer oder ein Datum)
*/
public class Schüler extends Person
{
int klasse;
}

View File

@ -1,17 +0,0 @@
public class Test
{
public static void test(){
Punkt P = new Punkt(1, -1);
Punkt Q = new Punkt(3,3);
Gerade g = new Gerade(P,Q);
System.out.println("Gerade g:" );
System.out.println(g.toString());
Gerade h = new Gerade(-0.5, 2);
System.out.println("Gerade h:" );
System.out.println(h.toString());
Punkt S = g.schneide(h);
System.out.println("Schnittpunkt: ");
System.out.println(S.toString());
}
}