[ Security_base ] - Provides the methods and properties | that all subclasses will have in common | |-----------------|--------------------| [ Security_novell ] [ Security_NT ] [ Security_win2000 ] The second level provides the behaviors, they may introduce additional methods and properties that are specific to the implementation.What this is doing is using inheritence to define the public interface of all security objects. The individula sub classes (all siblings to each other) provide the specific behaviors required by their respective environments.
--------------------------------------------- | Security_base | | | | [ Novell Behavior Object ] | | [ NT Behavior Object ] | | [ Win2000 Behavior Object ] | | | ---------------------------------------------In the second example the Security_base is a container that presents an interface to the outside world. It is capable of holding any one or more of the individula beahvior objects and can create them as needed at runtime. The specific behavior opbjects may or may not be subclasses of Security_base, however they are totally concealed from the outside world which only knows about Security_base.