InterviewSolution
Saved Bookmarks
| 1. |
Single level inheritance will be best for___________(a) Inheriting a class which performs all the calculations(b) Inheriting a class which can print all the calculation results(c) Inheriting a class which can perform and print all calculations(d) Inheriting all the classes for different calculationsThe question was asked in an internship interview.Query is from Single Level Inheritance in chapter Inheritance & its Types of Object Oriented Programming |
|
Answer» CORRECT CHOICE is (b) Inheriting a class which can print all the CALCULATION results Best explanation: Inheriting a class which can PERFORM the most common task will be more efficient. If class which can perform all the calculations is inherited then there won’t be any problem to print the result too. But if a class which can do the most common task for all the other tasks, it will make real use of INHERITANCE. |
|