¿Cuál es el resultado de ejecutar el siguiente código?
public class Shape {
private String color;
public Shape(String color) {
this.color = color;
}
public String getColor() {
return color;
}
public double getArea() {
return 0.0;
}
}
public class Rectangle extends Shape {
private double width;
private double height;
public Rectangle(String color, double width, double height) {
super(color);
this.width = width;
this.height = height;
}
public double getWidth() {
return width;
}
public double getHeight() {
return height;
}
public double getArea() {
return width * height;
}
}
public class Square extends Rectangle {
public Square(String color, double side) {
super(color, side, side);
}
}
public class Main {
public static void main(String[] args) {
Shape s = new Square("blue", 5);
System.out.println(s.getColor() + " " + s.getArea());
}
}