class Rect {
private int x;
private int y;
public Rect(int x,int y) {
this.x = x;
this.y = y;
}
public int getArea() {
return x * y;
}
}
public class Main {
public static void main(String args[]) {
Rect r1 = new Rect(4,5);
Rect r2 = new Rect(6,7);
System.out.println(addArea(r1,r2));
}
public static int addArea(Rect r1,Rect r2) {
return r1.getArea() + r2.getArea();
}
}