Example #1
0
 public void useHerramienta(String her, int tam)
 {
     if (her.Equals("pen"))
     {
         this.herramienta = new Pencil(tam);
     }
     else if (her.Equals("aero"))
     {
         this.herramienta = new Aerografo(tam);
     }
     else if (her.Equals("broc"))
     {
         this.herramienta = new Brocha(tam);
     }
     else if (her.Equals("goma"))
     {
         this.herramienta = new Goma(tam);
     }
 }
Example #2
0
 public Controlador()
 {
     herramienta = new Pencil(10);
 }