[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Stumble Upon



[14/10/08 19:12] Richard Ibbotson wrote:
> Aahhh !  'apt-cache search stumbleupon'.  Which says ... " mozilla-
> stumbleupon - Mozilla addon for sharing interesting websites "
> 
> So, I clicked on the Stumbleupon in the browser and this is what came 
> back...
> 
> http://www.thealmightyguru.com/Humor/Docs/ShootYourselfInTheFoot.html

Classic!  Although I prefer the longer version of the Java one.


Java = You locate the Gun class, but discover that the Bullet class is
abstract, so you extend it and write the missing part of the
implementation. Then you implement the ShootAble interface for your
foot, and recompile the Foot class. The interface lets the bullet call
the doDamage method on the Foot, so the Foot can damage itself in the
most effective way.

Now you run the program, and call the doShoot method on the instance of
the Gun class. First the Gun creates an instance of Bullet, which calls
the doFire method of the Gun. The Gun calls the hit (Bullet) method on
the Foot, and the instance of Bullet is passed to the Foot. But this
causes an IllegalHitByBulletException to be thrown, and you die.

_______________________________________________
Sheffield Linux User's Group
http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk
FAQ at: http://www.sheflug.org.uk/mailfaq.html

GNU - The Choice of a Complete Generation