23. aban
parent
fb84aa0f19
commit
bdec81dd1a
|
@ -1,4 +1,4 @@
|
|||
|
||||
import java.util.random
|
||||
|
||||
public class Auto
|
||||
{
|
||||
|
@ -6,7 +6,8 @@ public class Auto
|
|||
String farbe;
|
||||
public Auto(String f)
|
||||
{
|
||||
raeder = 4;
|
||||
Random rand = new Random();
|
||||
raeder = rand.nextInt(50);
|
||||
farbe = f;
|
||||
}
|
||||
public void hupe()
|
||||
|
@ -20,5 +21,6 @@ public class Auto
|
|||
public void Ausgabe()
|
||||
{
|
||||
System.out.println("ich bin ein" + farbe + "es Auto!");
|
||||
hupe();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
public class Gerade
|
||||
{
|
||||
double m;
|
||||
double c;
|
||||
public Gerade(double _m, double _c)
|
||||
{
|
||||
m = _m;
|
||||
c = _c;
|
||||
}
|
||||
|
||||
public Gerade( Punkt p1, Punkt p2)
|
||||
{
|
||||
m = (p2.y -p1.y) / (p2.x - p1.x);
|
||||
c = p1.y - m* p1.x;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
public class Punkt
|
||||
{
|
||||
double x;
|
||||
double y;
|
||||
public Punkt( double _x, double _y)
|
||||
{
|
||||
x = _x;
|
||||
y = _y;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue