Help with 55 Code Project
Can someone help me figure out what I'm doing wrong? I'm supposed to tell the program to calculate the area of a square and a circle, I did that but my code doesn't seem to be working. Here is the code I have so far: import java.util.Scanner; abstract class Shape { int width; abstract void area(); } //your code goes here class Square extends Shape { public void area() { a.area = int x*int x; return area; } } class Square extends Shape { b.area = Math.PI(3.14*2*2); return area; } 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(); } }