Object-Oriented Programming
Not what you're looking for?
2) What is it's role in object-oriented programming?
3) What is the difference between functional and imperative programming language?
4) Why is LISP dominating the Artificial Intelligence?
Purchase this Solution
Solution Summary
Dynamic binding and its role in object-oriented programming are explained. The difference between functional and imperative programming languages is explored. Dominance of LISP in the Artificial Intelligence is explained.
Solution Preview
What is dynamic binding?
--------------------------------------------------------------------------------
2) What is it's role in object-oriented programming?
Dynamic binding has two forms:
- Static and
- Dynamic.
Statically-typed dynamic binding is found in languages such as C++ (virtual functions) and Eiffel
(redefinition). It is not known which function will be called for a virtual function at run-time because a derived class may override the function, in which case the overriding function must be called. Statically determining all possibilities of usage is undecidable. When the complete program is compiled, all such functions are resolved (statically) for actual objects. Formal object
usage must have a consistent way of accessing these functions, as achieved thru vtables of function pointers in the actual objects (C++) or equivalent, providing statically-typed dynamic binding (this is really just defining simple function pointers with static typechecking in the base class, and filling them in in the derived class, along with offsets to reset the receiver).
The run-time selection of methods is another case of dynamic binding, meaning lookup is performed (bound) at run-time (dynamically). This is often desired and even required in many applications including databases, distributed programming and user interaction (e.g. GUIs).
Example: A cut operation in an Edit submenu may pass the cut
operation (along with parameters) to any object on the desktop, each of which
handles the message in its own way (OO). If an (application) ...
Purchase this Solution
Free BrainMass Quizzes
C# variables and classes
This quiz contains questions about C# classes and variables.
Javscript Basics
Quiz on basics of javascript programming language.
Inserting and deleting in a linked list
This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.
Basic Networking Questions
This quiz consists of some basic networking questions.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.