Why is this java code - solution of course project "figures" is wrong
import java.util.Scanner; import java.lang.Math; abstract class Shape { int width; abstract void area(); } //введите код сюда class Square extends Shape { Square(int a){ this.width = a; } public void area () { System.out.println(this.width*this.width); } } class Circle extends Shape { Circle(int a){ this.width = a; } public void area () { System.out.println(this.width*this.width*Math.PI); } } public class Program { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); Square a = new Square(x); Circle b = new Circle(y); a.area(); b.area(); } }