Wednesday, August 10, 2005

A Primer on Object-Oriented Programming

This little primer page on oop was good for refreshing my memory on the basics of OO (ie: Encapsulation, Inheritance, and Polymorphism). However, it describes Polymorphism as overloading functions (ie: having multiple methods with the same signature), which is wrong; polymorphism is the ability of an object to behave as a different (base) type or interface, from the point of view of a caller.

1 Comments:

Blogger Unknown said...

Junk mail comments, crap ey? This one looks like it was done manually, but I've been getting others on my VirtualEmlyn blog that appear automated; the moment I post something, a bot adds a comment that is rididulously unrelated, but includes a link to some other site. Funky stuff, I love that kind of anarchy online.

Anyway, what I really wanted to say was that my point about polymorphism wasn't entirely correct; polymorphism is the ability to create subclasses that replace the behaviour of the superclass with new behaviour (and then can be used in place of the superclass, obviously). Bad brain day I guess, no good excuse :-)

6:04 PM  

Post a Comment

<< Home