composition
C++ Design (behavior in base class, private member supplied in derived class)
I have 6 classes which all perform the same actions. I would like to move common behavior to a common [base] class.[详细]
2023-04-12 02:26 分类:问答Actionscrpipt 3 OOP
I am developing player which has several my own custom developed buttons which has their own classes. Also the player has its own class which is the main class and instansiate all the buttons I have.[详细]
2023-04-10 06:10 分类:问答Is the way of grouping classes different with PHP? [closed]
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a[详细]
2023-04-10 02:52 分类:问答How should I implement interface composition?
I have this situation: public interface IHasValue<T> { T Value { get; set; } } public interface IClickable[详细]
2023-04-09 01:07 分类:问答Does CompositionContainer.SatisfyImportsOnce reuse components?
In a WCF service project, I have created a simple wrapper for MEF CompositionContainer to simplify its instantiation :[详细]
2023-04-08 14:57 分类:问答Multiple user types - inheritence or composition?
I have two \"types\" of Accounts in my site, with VERY different functionality, and a few different fields between them. These two types, however, share the same table of \"basic account\" fields.[详细]
2023-04-07 01:27 分类:问答why does bi-directional composition is not good to pass a value type?
I have only 2 classes: class A { public B b = new B(); public bool flag {get; set;} } class B { public void foo()[详细]
2023-04-06 05:41 分类:问答Avoiding binding objects in OOP
I\'ve read that it\'s recommended not binding components together since if you remove a part the rest might not function properly. However, I see no alternative to binding objects together when using[详细]
2023-04-01 14:12 分类:问答Composition with android.app.Activity
The source of wisdom \"Effective Java 2nd\" says\"Favor composition over inheritance\" (item 16). Now when it comes to Android Activities, it\'s simple to extends from one but you break encapsulation[详细]
2023-03-31 23:39 分类:问答How to support dual versions of an interface in MEF?
I am managing a complex projects which share components through shared contracts.There are several hosts and many of these shared plugins.[详细]
2023-03-31 03:34 分类:问答