Containment (computer programming)

From Wikipedia, the free encyclopedia
  (Redirected from Containership (computer science))
Jump to: navigation, search

In OOP supported languages, containership means an object is created within another object.

For Example in C++:

class A
{
        int a;
}x;
 
class B
{
        A y; // All the data members and member functions of class A can be accessed through the object 'y'
}z;

[edit] See also


difference between Container ship and Inheritance? http://forums.devx.com/archive/index.php/t-86776.html

Personal tools
Namespaces
Variants
Actions
Navigation
Interaction
Toolbox
Print/export