Instantiation - Research Article from World of Computer Science

This encyclopedia article consists of approximately 1 page of information about Instantiation.
Encyclopedia Article

Instantiation - Research Article from World of Computer Science

This encyclopedia article consists of approximately 1 page of information about Instantiation.
This section contains 176 words
(approx. 1 page at 300 words per page)

Instantiation is the value or more specific variable (concrete code) that is generated using a template. Let's use a basic example of an addition expression a+b, wheras this expression is part of program. "a" and "b" are variables. An instantiation could be either of the following examples.

  • Example 1: If a=1, and b= 2, then 1+2
  • Example 2: If a=sumCol(A) in table 1 and b=sumCol(B) in table 2 sumCol(A) + sumCol(B)

In example 1, "a" and "b" are are simply integers, they are specific values. In example 2, "a" and "b" represent the result of summation of column (A) and the summation of column (B). "sumCol(A)" and "sumCol(B)" are still variables, but they are more specific.

In object-oriented programming, instantiation is a more precisely defined version of some object which was already partially defined. An example of an object would be animals. To partially define animals, we name a specific class, dogs. A instance of dogs is Dalmatians. An instantiation would be Mary's Dalmatian, Rover. Rover is a specific Dalmatian that belongs to Mary.

This section contains 176 words
(approx. 1 page at 300 words per page)
Copyrights
Gale
Instantiation from Gale. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.