Yes. If IShape has the only getArea() method, it can be used in any shape i.e. Rectangle, Circle, Triangle to the area of that shape. The circle doesn't have width or height so Circle class itself can have a method called getRadius(). Similarly Rectangle can have getWidth() and getHeight().
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes. If IShape has the only getArea() method, it can be used in any shape i.e. Rectangle, Circle, Triangle to the area of that shape. The circle doesn't have width or height so Circle class itself can have a method called getRadius(). Similarly Rectangle can have getWidth() and getHeight().