Is-a/has-a differenciation is reasonable. However in your Shape example I would use an IDrawable. U need abstract classes e.g. when the template pattern needs to be implemented. Cheers
Shape example is just an "example" as it is most commonly understood by everyone. I think it is "Hello World" of inheritance.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Is-a/has-a differenciation is reasonable. However in your Shape example I would use an IDrawable.
U need abstract classes e.g. when the template pattern needs to be implemented.
Cheers
Shape example is just an "example" as it is most commonly understood by everyone. I think it is "Hello World" of inheritance.