Difference between a homogeneous and a heterogeneous container

Difference between a homogeneous and a heterogeneous container.

A container is an object holding instances of another object. A container that contains or holds objects of a single type is said to be homogenous. On the other hand, A container that contains objects (derived from a common base class) of a variety of types is termed heterogeneous.

Difference between a homogeneous and a heterogeneous container.

When a container class contains a group of mixed objects, the container is called a heterogeneous container; when the container is holding a group of objects that are all the same, the container is called a homogeneous container.
What is a container class? What are the types of container classes?
What is a container class? What are the types of container classes? - A class is said to be a container class which is utilized for the purpose of holding objects in memory or persistent media....
What are the different types of inheritance?
Different types of inheritance - Single Inheritance, Multiple Inheritance, Hierarchical inheritance, Multilevel inheritance...
What is a concrete derived class?
What is a concrete derived class? - The derived class that implements the missing functionality of an abstract class...
Post your comment