Different types of object collaboration in C#

There are many ways an object can collaborate with other objects in programming. However, in this chapter, we will only talk about the three most important collaboration rules.

We will first try to explain each of these types, looking at some examples to help us to understand them. If you can't relate these concepts to your work, it might be a little hard for you to understand the importance of object collaboration, but trust me, these concepts are very important on your path to becoming a good software developer.

All these concepts and terms will come in handy when you have discussions about software design with other people, or even when you design your own software. As a consequence, my suggestion would be to focus on understanding the concepts and relate them to your work in order to reap the benefits of this information.

Now, let's look at the three collaboration types that we are going to be talking about in this chapter, as shown in the following list:

  • Dependency
  • Association
  • Inheritance

Let's think of an imaginary application and try to relate these collaboration concepts to the objects of this application, learning is easier and more interesting when you can relate concepts to the real world, so this is the approach we will take in the following sections.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.151.144