• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About principal characteristics of OOP

 
Jack Lau
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
The following question is from www.jchq.net
Name three principal characteristics of Object Oriented programming?
1) encapsulation, dynamic binding, polymorphism
2) polymorphism, overloading, overriding
3) encapsulation, inheritance, dynamic binding
4) encapsulation, inheritance, polymorphism
The answer is 4
I know 4 is a correct answer, but I don't understand why 3 is not correct.
Late binding, dynamic binding and polymorphism are not the same ?
Thanks in advance!
Jack
 
Bikhu Matre
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Link
Try this.
 
vani vani
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Static binding means that the function being called is determined as the program is compiled
Dynamic binding is the opposite of static binding. The binding decision is delayed until runtime. This allows you to add components to your program while it is still running. If the runtime environment is designed to support this (and Rhapsody should be), it opens up a lot of interesting possibilities.

The C++ language supports a limited version of dynamic binding called late binding. In C++, a function call must type-match exactly the called function (called static typing) or else type-match exactly an inherited function. Though C++ virtual functions allow you to delay the binding until runtime, the type constraints still apply. Late binding is still restricted. Dynamic binding is unconstrained.
 
Anupreet Arora
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that polymorphism is a broader term, which groups the concepts of dynamic binding, static binding, super class variables to access sub class objects, overriding, dynamic method dispatch etc.
And Ans C is correct because its Polymorphism that is one of the pillars of OOPs and not just dynamic binding.
Comments are welcome.
 
Anupreet Arora
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correction : Ans D
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic