# data[].attributes.body
import java.util.Scanner;
class Shape{

public Shape(){}

public static void main(String args[]){
Circle Objc = new Circle();
Rectangle objr = new Rectangle(5, 7);

double J = Objc.getradius();
System.out.println("Radius :"+ J);

int W = objr.getwidth();
System.out.println("Width :" + W);
int L = objr.getlenght();
System.out.println("Lenght :"+ L);

// mengira luar

System.out.println("Area of Circle"+Objc.getArea(J));
System.out.println("Area of Rectangle"+objr.getArea(W, L));

}

public double getArea(int w, int l){
return w * l; }

public double getperimeter(int w, int l){
return (2*w + 2*l); }
}

class Circle extends ArrayShape{
private double radius;
final double PI = 3.142;

public Circle(){}

public double getradius(){
Scanner scan = new Scanner(System.in);
System.out.println("Enter Radius :");
double jejari = scan.nextDouble();
return jejari;
}

public double getArea(double r){
return (PI * r*r); }

public void getperimeter(double j){
System.out.println(2* PI *j); }

}

class Rectangle extends ArrayShape{

private int width;
private int lenght;

public Rectangle(int w, int l){
this.width= w;
this.lenght= l;}

public int getwidth(){

return this.width;
}

public int getlenght(){
return this.lenght;
}
}

# data[].attributes.body
class Array{

public Array (){
System.out.println("Array");
}

public static void main(String args[]){
Array obj[] = {new Array(), new A(), new B()};

for (int i =0; i< 3; i++){
obj[i].method1();}

}

public void method1(){

System.out.println("methodinduk");
}

}

class A extends Array{
public A(){
System.out.println("A");
}

public void method1(){

System.out.println("methodanak");
}
}

class B extends Array{

public B(){
System.out.println("B");
}

}

# data[].attributes.body
import java.util.Scanner;

// class ibu
class Shape{

public static void main(String args[]){
Circle a = new Circle();
Circle b = new Circle (5.5);
System.out.println("Enter radius :");
double jejari = a.getradius();
System.out.println("Enter radius :");
b.getradius();
System.out.println("Luas A= "+a.getArea());
double area = b.getArea();
System.out.println("Luas B = "+area);

a.getperimeter(jejari);

}

public void getperimeter(double j){

System.out.println(2 * j);

}

public double getArea(int panjang, int lebar){
return (panjang * lebar);}

}

// class circlern sebagai anak
class Circle extends Shape{
// atribute readius

private double radius;

final double PI = 3.142;

// constructor

public Circle(){}

public Circle(double r){

this.radius=r;
}
public double getradius(){
Scanner scan = new Scanner(System.in);
return radius = scan.nextDouble();
}

public double getArea(){
return (PI*radius*radius);}

}

// class circlern sebagai anak

class Rectangle extends Shape{

}