Polimorfismo

Colapsar
X
 
  • Tiempo
  • Mostrar
Limpiar Todo
nuevos mensajes
  • jotabin
    un nene
    • 15-04-2003
    • 20427

    #1

    Polimorfismo

    The problem with most computer science texts is the examples aren't interesting. Polymorphism isn't really hard to understand, but the examples are usually boring or difficult to understand. This is an alternative text which attempts to use a problem space that's already familiar to the college student to make the concepts of programming simple.

    This domain name has been registered with Gandi.net. It is currently parked by the owner.
    viva la résistance !
  • Merengue
    Merengol
    • 07-01-2006
    • 7675

    #2
    Too nerd to be enjoyed by me.

    Comentario

    • Kain
      =o!
      • 18-08-2003
      • 5312

      #3
      JAUjaUA
      rocanrol

      Comentario

      • MoaLaiSkirulais
        ^^(V)^^
        • 08-07-2003
        • 23268

        #4
        sssssta biennnnnnnn!

        Código PHP:
        class Pussy extends Hole {}
        class Mouth extends Hole {}
        class Ass extends Hole {}
        
        class Penis {
          public Fuck(Hole h) {
            while(!this.isSpent) {
              h.TakeAThrust(this);
              this.arousal++;
            }
            h.TakeALoad(this.load);
          }
        }
        
        abstract class Hole {
          public abstract void TakeAThrust(Penis p);
        
          public abstract void TakeALoad(Load l);
        }
        
        public void TakeAThrust(Penis p) {
          if(!enoughLube && p.Circumference > 6) {
            analFissureCount++;
          }
        }
        
        //in Pussy
        public void TakeALoad(Load l) {
          //randomly determine whether to cause a pregnancy with a 10% chance...
          if(Math.RandomNumber() % 10 == 0) {
            this.Woman.EggFactory.GetEgg().Inseminate(l);
          }
        }
        
        //in Mouth
        public void TakeALoad(Load l) {
          //50-50 chance of spitting or swallowing
          if(Math.RandomNumber() % 1 == 0) {
            this.Spit(l);
          } else {
            this.Swallow(l);
          }
        }
        
        //create an array of 4 women
        Woman[] women = new Woman[]{new Woman(), new Woman(), new Woman(), new Woman()}; 
        
        //create a hole array to reference the holes of all 4 women, plus two additional holes.
        Hole[] holes = new Hole[4*3 + 2];
        
        for(int i = 0; i < women.Length; i++) { 
          holes[3 * i + 0] = women[i].Mouth;
          holes[3 * i + 1] = women[i].Pussy;
          holes[3 * i + 2] = women[i].Ass;
        }
        
        //additional holes (so the faggy programmers don't feel left out)
        Man m = new Man();
        holes[12] = m.Mouth;
        holes[13] = m.Ass;
        
        //now we loop through the holes and fuck them all with the same Penis
        
        Penis p = new Man().Penis;
        
        foreach(Hole h in holes) {
          p.Fuck(h);
        } 
        

        Comentario

        • Petronio
          http://bit.ly/lH5N1X
          • 14-04-2003
          • 15803

          #5
          programacion orientada a ojetes
          "Convierte todo en lo que realmente es: lo abstracto, el espíritu, el nagual. No hay brujería, no hay el mal, ni el demonio. Solo existe la percepción."

          Comentario

          • Night Walker
            イノベイター。
            • 22-11-2006
            • 9213

            #6
            Ooookkkkkkk

            Comentario

            • Kangreeman
              IL Tyno©
              • 02-09-2007
              • 4952

              #7
              aguante el polimorfismo!
              ahh re que llegue como 1 año despues pero bue jajaj

              Comentario

              Trabajando...