C++ Language INTERVIEW QUESTION & ANSWERS
91. |
What is method overriding? |
|
Method overriding is a mechanism in which the sub class method overrides the base class method. If the same function name is present in both the base class and the sub class then the sub class method overrides the base class method. |
92. |
What is inline function? |
|
Inline function is defined as a function definition such that each call to the function is in effect, replaced by the statements that define the function. It is expanded in line
when it is invoked. |
93. |
What are concrete classes? |
|
Concrete classes can be instantiated (in other words, objects can be created from concrete classes). These classes have no abstract methods. Concrete classes are a logical complement of abstract classes. |
94. |
What is class cohesion? |
|
Cohesion indicates how closely the members are related to each other or how strongly the members depend on each other in a class. Highly cohesive classes or modules indicate good design. |
95. |
What is class coupling? |
|
Coupling means how two (or more classes) are dependent or strongly related to each other. When two classes are tightly coupled, change in one class usually requires change in the other class. Therefore, tightly coupled classes are not recommended. |