problem in more on class lesson in sololearn
hi in the last project of more on classes on java my code doesn't pass test case 3, but it seems fine to me. can somebody explain why, please. this is my code: import java.util.Scanner; abstract class Shape { int width; abstract void area(); } class Square extends Shape { public Square(int width){ this.width=width; } public void area(){ System.out.println(width*width); } } class Circle extends Shape{ public Circle (int width){ this.width=width; } public void area(){ System.out.println(width*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(); } }