0
Why my code error? (Project 5)
class Square extends Shape { public int area2; public Square (int x) { width =x; } public void area() { area2 =width*width; System.out.println (area2 ); } } class Circle extends Shape { public double area1; public Circle (int y) { width =y; } public void area() { area1 =Math.pI*width*width; System .out .println (area1); } }
3 Answers
0
Yeah u missing Shape class
0
Sorry I couldn't clear this code
- 1
Where is the Shape class.