import java.util.*;
public class MachineComposite extends MachineComponent {
   protected MachineList components = new MachineList();
   public void add(MachineComponent component) {
      components.add(component);
   }
   public int getMachineCount() {
		MachineIterator it = components.iterator();
		int count = 0;
		while(it.hasNext()) {
			MachineComponent c = it.next();
			count += c.getMachineCount();
		}
		return count;
   }
}
