abstract class Shap
{
    public String lineColor;                //ݳԱ
    public String fillColor;                 //ݳԱ
    public void setLineColor(String col)      //һ㷽ɫд
    {
       lineColor = col;
    }
    public void setFillColor(String col)      //һ㷽ɫд
    {
       fillColor = col;
    }
    abstract void draw();                 //󷽷
}
class Rectangle extends Shap
{
    float width,height;
    public Rectangle(float width, float height)
    {
       this.width = width;
       this.height = height;
   }
   public void draw()                        //ʵֳ󷽷
   {
       System.out.print("RectangleLine Color = " + lineColor + ", Fill Color = " + fillColor);
       System.out.println(", Width = " + width + ", Height = " + height);
   }
}
class Circle extends Shap
{
    double radius;
    public Circle (double radius)
    {
       this.radius = radius;
   }
   public void draw()                   //ʵֳ󷽷
   {
       System.out.print("CircleLine Color = " + lineColor + ", Fill Color = " + fillColor);
       System.out.println(", Radius = " + radius);
   }
}
public class Test4_11
{
      public static void main(String[] args)         
      {
           Rectangle rectangle = new Rectangle(20,10);  //һRectangle
           rectangle.setLineColor("blue");             //ø෽
           rectangle.setFillColor("yellow");
           rectangle.draw();                  //Rectangleеdraw

           Circle circle = new Circle (5.5) ;
           circle.setLineColor("red");          //ø෽
           circle.setFillColor("green");
           circle.draw();                    //Circleеdraw
     }
}
