public class Point {
double x,y;
public Point(double x, double y){
this.x = x;
this.y = y;
}
}
public class Circle {
Mittelpunkt;
doppelter Radius;
public Kreis(Mittelpunkt, doppelter Radius){
this.center=center;
this.radius=radius;
}
}
public class Circle {Output
Mittelpunkt;
statischer Doppelradius;
public Kreis(Mittelpunkt, doppelter Radius){
this.center=center;
this.radius=radius;
}
static double getDiametre(){
return radius*2;
}
static double getLength(){
return 2*3.14*radius;
}
static double getSurface(){
return 3.14*Math.pow(radius, 2);
}
static double getLengthArc(double alpha){
return 3.14*alpha;
}
public static void main(String[] args) {
Circle = new Circle(new Point(0, 0), 8);
System.out.println("Diameter: "+Circle.getDiameter());
System.out.println("Länge: "+Circle.getLength());
//Bogenlänge mit einem Winkel von 55 Bogenmaß
doppeltes Alpha = 55;
System.out.println("Bogenlänge: "+Circle.getArcLength(55));
System.out.println("Oberfläche: "+Circle.getSurface());
}
}
Diameter: 16.0
Umfang: 50.24
Bogenlänge: 172.700000000000002
Fläche: 200.96
Please disable your ad blocker and refresh the window to use this website.