Tutorials to .com

Tutorials to .com » Dotnet » Oop » Remarks: With regard to the composition of

Remarks: With regard to the composition of

Print View , by: iSee ,Total views: 11 ,Word Count: 218 ,Date: Tue, 21 Apr 2009 Time: 10:19 PM

Do a very good example, said first composition. Composition used to do such a thing: you need to assemble a bunch of things together, so that they form a whole. However, you want to visit their non-discriminatory, that is to say, when you visit them, in your opinion they are the same. There is no difference. But they are actually bound in accordance with the rules or some sort of orderly combination.
Composition of the simplest example is the post bbs. bbs posts, before you click on them there is no difference between them, but in fact they have the level of relations relations back through these relationships together.
The principle mode of composition is: an example of the parent as a member of subclass. Subclass of the Father through the example of the operation type to determine their own assembly with the way the parent category.
When you visit these categories when the parent class through the public way to visit. This time there is no difference between them. Like bbs, son of the father of stickers affixed to retain a reference.
In addition, the composition can also be used for other aspects, not just the level of combinations. Examples of this category depends on the father's relationship with the subclass


.Net Object Oriented Programming Articles


Can't Find What You're Looking For?


Rating: Not yet rated

Comments

No comments posted.