Java shape class not passing
Dear all, I have done the java test tutorial it is passing g the test case but problem is this session not completed is there any issues of my code import java.util.Scanner; abstract class Shape { int width; public void setValue(int width) {this.width = width; } public int getWidth() { return width; } abstract double area(); } //your code goes here class Circle extends Shape{ public double area (){ return getWidth() * getWidth()*Math.PI; } } class Square extends Shape{ public double area(){ return getWidth() * getWidth(); } } public class Program { public static void main(String[ ] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); Shape sp; Square a = new Square (); sp =a; sp.setValue(x); System.out.println((int)sp.area()); Circle b = new Circle(); sp =b; sp.setValue(y); System.out.println(sp.area());}}