Exemplo n.º 1
0
 //Accessor function to set what the robot will construct
 public void setWhatToAssemble(GuitarComponent whatToAssemble)
 {
     this.whatToAssemble = whatToAssemble;
     this.compositeIterator = new CompositeIterator(whatToAssemble.createIterator());
 }
Exemplo n.º 2
0
 //Public constructor, names the robot and tells it what to assemble
 public Robot(String whichRobot, GuitarComponent whatToAssemble)
 {
     this.whichRobot = whichRobot;
     this.whatToAssemble = whatToAssemble;
     this.compositeIterator = new CompositeIterator(whatToAssemble.createIterator());
 }