Hi Charles,
On the contrary reusing code is not cheating. It is actually one of the 
core principles behind object oriented languages like Java, Python, and 
C# .NET. Code reuse is one of the major principles, foundations, drilled 
into new programming students heads when they enter a tech school or 
university.
For example, object oriented languages use a technique called 
inheritance. Inheritance allows a programmer to expand or extend a piece 
of existing code to meet the demands of a new program. This saves lots 
of time because the base functionality of the
existing code remains the same, but is improved or specialized by the 
new code extension.
Another cool feature of modern programming languages is known as 
polymorphism. With this technique you can create several methods with 
the same name but different parameters. The compiler or runtime 
environment will be able to figure out which method you are using and 
correctly execute your code. This symplifies things by allowing you to 
use the same code but differently on a case by case basis.
Software companies that are in it for the long hall tend to create 
development kits which are typically core libraries or applications that 
can be used to quickly put together new applications with a common 
framework. Often times development kits can be based on other 
development kits that might be based on more lower level development 
kits to symplify or specialise a development kit  for a specific need.
For example let us say USA Games creates a sdk for game programming. 
That development kit might be based on the .NET Framework and Managed 
DirectX which are development kits from Microsoft based on lower level 
development kits like Win32 and the DirectX com components.
All of it is possible through object oriented design that can be 
extended and reextended as needed. Everytime you extend an applications 
code it gets more specialised and yet still has the base functionality 
at the top of the code tree.
For example, let us say we make a class called starship. This holds all 
the generic data for a starship. Well, we need something more specific 
so we create a class called Federation which Extends starship with some 
specific features of Federation starships. However, the Federation has 
all kinds of starships so we need to subclass them in To Galaxy Class, 
Defiant Class, Sovereign Class, Constitution Class, etc. If we want to 
add some enemy ships we could extend the Starship class by adding a 
class called Romulan, and then subclasses of Romulan ships. Do you see 
how the code tree works?



---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [EMAIL PROTECTED]
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[EMAIL PROTECTED]
If you have any questions or concerns regarding the management of the list,
please send E-mail to [EMAIL PROTECTED]

Reply via email to