1.

Explain The Concept Of Inheritance In Pb?

Answer»

It is a feature that enables you to build windows, user objects, and menus that are derived from existing objects. When you change an ancestor OBJECT, the changes are reflected in all the descendants and the descendant inherits the ancestor's scripts.

Two main features to be noted here are:

  1. Descendant objects - In PB, an object class can be inherited from another class. The inherited or descendent object has all the instance variables, events, and functions of the ancestor. You can augment the descendant by adding more variables, events, and functions. If you change the ancestor, even after editing the descendant, the descendant incorporates the changes.
  2. Instantiating - When you instantiate a descendent object, PowerBuilder also INSTANTIATES all its ancestor classes. You do not have programmatic ACCESS to these ancestor instances, except in a few limited ways, such as when you use the scope OPERATOR to access an ancestor VERSION of a function or event script.

It is a feature that enables you to build windows, user objects, and menus that are derived from existing objects. When you change an ancestor object, the changes are reflected in all the descendants and the descendant inherits the ancestor's scripts.

Two main features to be noted here are:



Discussion

No Comment Found