View Single Post
Old 04-15-2013, 02:47 PM   #48
Reincarnate
x'); DROP TABLE FFR;--
Sectional ModeratorFFR Veteran
 
Reincarnate's Avatar
 
Join Date: Nov 2010
Posts: 6,334
Default Re: Teach me CS stuff for interviews

yeah I am not getting this, lol.

I'm still not seeing what the differentiating notion is here -- what this accomplishes that I can't already do by just localizing the move/make_sound functions to what they logically apply to.

All animals make sound, and all cats/dogs make sounds, too. But to me, this just implies that I could have make_sound in the animal class and have the sound variable/file/whatever localized to the cat and dog classes. That way when I call make_sound() on a cat object, it takes the sound variable in cat and plays it via the animal's make_sound() function. Or something to that logical effect.
Reincarnate is offline   Reply With Quote