Instantiation is the process of transforming an abstraction into a concrete example. An abstraction is any entity that exists independently of context or specific attributes. The process of instantiation is one of taking an abstraction and giving it detailed form within some “real” context. This process involves specification, whereby the generic features of the abstract model must be given specific attributes in order to become a specific instance of that generic from and exist within some real world context.
Instantiation can be seen as the opposite from abstraction. During abstraction, successive layers of detail are removed from a variety of concrete instances in order to derive the generic class that those entities form part of in the abstract. Instantiation is the reverse process, where we start with a predefined abstract class and go through a process to creating one or more real instances of that class.
A class is an abstract set or category of things having some property or attribute in common. A class is analogous a blueprint. For example, to build a house one would make a master plan first, this model would describe everything about how that house will be built. However it is not the house itself, one would then have to use that blueprint to build the house through the process of instantiation. A class is then a generic abstract form that can be used to create real objects. One can create a class and then use that to create a diversity of instances with different attributes. Just as we could use the same blueprint to build five, ten or two hundred houses, one can define a class and then create a thousand instances based on that one class. The class is always created first and then used to instantiate specific, concrete forms.
Classes can be structured in a hierarchical fashion in order of their degree of abstraction. So Max, the dog, is an instance of the class of border collie. However, the class of all border collies is a subclass of all dogs, which is, in turn, a subclass of all animals, which is again a subclass of all creatures and so on. At each level up on the hierarchy, we are dealing with a more abstract entity, all classes below a given class that form part of it are said to inherit their attributes from it. So if the abstract class of all creates has the fundamental attribute of homeostasis, then all subclasses will inherit that attribute and be required to maintain homeostasis. This pervasive design pattern in our world helps to reduce complexity and provides a fundamental ordering principle to our universe.
Each object in the real world can be considered an instance of a particular class. Instantiation is the process of creating an object or real instance from an abstract class. Each object once instantiated then has its own identity, properties, and features. Whereas the class might be the class of cars with each car having a color, the actual instance of that class will specify exactly what the color is, a black car, a white car, etc. An instance is then a concrete occurrence of any object with specifications.
1. Collinsdictionary.com. (2020). Definition of instantiation. [online] Available at: https://www.collinsdictionary.com/dictionary/english/instantiation [Accessed 15 Sep. 2020].
2. Lexico Dictionaries | English. (2020). Class | Definition of Class by Oxford Dictionary on Lexico.com also meaning of Class. [online] Available at: https://www.lexico.com/definition/class [Accessed 15 Sep. 2020].
3. Lynda.com - from LinkedIn. (2018). Watch the Online Video Course Programming Foundations: Object-Oriented Design. [online] Available at: https://www.lynda.com/Python-tutorials/Programming-Foundations-Object-Oriented-Design/731735-2.html [Accessed 15 Sep. 2020].