package cn.model;
import cn.action.Drawable;
import java.util.Iterator;
import java.util.ArrayList;
import java.util.List;
public class CompositeShape extends Shape implements Drawable{
private ArrayList shapes;
public CompositeShape(String color,ArrayList<Shape> shapes){
this.color=color;
this.shapes=shapes;
}
public double getArea(){
return 0;
}
public void draw(String penType){
Shape.Paint paint=new Paint(penType);
Iterator<Shape> it1=shapes.iterator();
while(it1.hasNext()){
//我想在这里输出对象图形,但是不会调用对象中的数据
}
}
}