Favov object composition over inheritance

The other major concept you should recognize is that of object composition. This is simply the construction of objects that contain others: encapsulation of several objects inside another one. While many beginning OO programmers use inheritance to solve every problem, as you begin to write more elaborate programs, you will begin to appreciate the merits…

Program to an interface and not to an implementation

Putting this more succinctly, you should define the top of any class hierarchy with an abstract class or an interface, which implements no methods but simply defines the methods that class will support. Then in all of your derived classes you have more freedom to implement these methods as most suits your purposes.

Introduction to Problem Solving

Robert Harris Version Date: July 2, 1998 Regardless of what they do for a living or where they live, most people spend most of their waking hours, at work or at home, solving problems. Most problems we face are small, some are large and complex, but they all need to be solved in a satisfactory…

How to set Visual Studio 2008’s default “company name”

Option 1: Modify the registry info 32bit OS: HKLMSoftwareMicrosoftWindows NTCurrentVersionRegisteredOrganization 64bit OS: HKLMSoftwareWow6432NodeMicrosoftWindows NTCurrentVersionRegisteredOrganization It’s according to the following MSDN library documentation: #Template Parameters http://msdn.microsoft.com/en-us/library/eehb4faa.aspx For the AssemlyCompany (CompanyName) in AssemblyInfo, it’s $registeredorganization$ which uses value from registry key value from HKLMSoftwareMicrosoftWindows NTCurrentVersionRegisteredOrganization. (For 64 bit OS, the registry key is HKLMSoftwareWow6432NodeMicrosoftWindows NTCurrentVersionRegisteredOrganization) Option 2:…