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); } }
public Controlador() { herramienta = new Pencil(10); }