class Shape
{
void erase(){ }
void draw(){ }
}
class Triangle extends Shape
{
void erase(){ }
void draw(){ }
}
class Line extends Shape
{
void erase(){ }
void draw(){ }
}
class Circle extends Shape
{
void erase(){ }
void draw(){ }
}
public class OverridingTest
{
public static void main(
String arr[])
{
Circle c = new Circle();
Triangle t= new Triangle();
Line l= new Line();
}
void doStuff(Shape s)
{
s.erase();
s.draw();
}
}