public static void rum() { ISector sectorDecorado = new GenteAsustada(new ArbolGrande(new Sector(100)), 2); while (!sectorDecorado.estaApagado()) { sectorDecorado.mojar(10); Console.WriteLine(); } }
//IMPLEMENTACION DEL METODO DE LA CLASE PADRE QUE CREA LA INSTANCIA CONCRETA DE UN DECORADO public override ISector CrearDecorado(ISector pSector) { pSector = new GenteAsustada(pSector, this.cantidadPersonas); return(pSector); }