inheritance vs composition 06/21/2013 - CO2 Programming - 35 Replies npcs , players , guards/bats/pets and monsters/bosses all having coords , hp , size , mesh and more stuff in common
which would fit better inheritance or composition ? and why ?
should i just follow "has a" and "is a" theory ?
edit:
at efficiency they both sounds the same to me as at inheritance it would always go through base class tree until it reach the derived class , at composition it would do the same for custom types to use them at the composite class (the big complex one), not sure...
Composition calculator 01/06/2007 - CO2 Exploits, Hacks & Tools - 5 Replies I am well aware that there are many composition calculaters available, but i wanna contribute too. I made my own +1 calculater. The picture below illustrate how it works. I am sorry its on dos, but it works well. Its done in C++, if interested in my source code leave me a pm.
Edit:
I did not true my program, so it does not do exception handling.
Eg. desired + = 6, please do not enter non 0 values to number of +6, 7, 8, if not you will get crap results. lol
New version: cost...
Composition Calculator 09/30/2006 - CO2 Exploits, Hacks & Tools - 14 Replies Ok, so im a newbie using cotobo for a long time with only a couple of posts. Everybody would want to see if this is clean and all so please somebody scan it.
Why did i make this? Well, i liked the one posted on TQ board but one of the feature never got finished (subtracting what you current have). You can check here
http://shellz2.future-hosting.net/~sony/c ompose.php
This program is written VB and this is my second VB program besides (Hello World) so it's quite ugly and very plain.
...