Final classes
i camed across a nice C++ question which shows the final class principle (as I read here: http://www.codeguru.com/Cpp/Cpp/cpp_mfc/stl/article.php/c4143/ it seems that the final class specifier exist in Java) 1. A class that is not derived from a class nor is intended to have any class derived from it is an example of what type of class? A. A concrete class B. An abstract class C. A base class D. A virtual class E. A final class A final class is a class from which you dont derive (if you try to, the objects of the derived classes cant be constructed since the compiler will complain about this). So how can you design such class ? In C++ there is no keyword (final) to declare a class as non-inheritable as in Java. But then C++ has its own features which you may exploit to get the same behaviour. Basically it uses concepts of private constructor and friend class. For example, lets try to create a class called CFinal. class CFinal { // member data ... } We want to be able to use this class...