Curioustab
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Aptitude
General Knowledge
Verbal Reasoning
Computer Science
Interview
Home
»
C# Programming
»
Inheritance
Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities?
Polymorphism
Containership
Templates
Encapsulation
Inheritance
Correct Answer:
Inheritance
← Previous Question
Next Question→
More Questions from
Inheritance
In an inheritance chain which of the following members of base class are accessible to the derived class members? static protected private shared public
Which of the following statements are correct about Inheritance in C#.NET? A derived class object contains all the base class data. Inheritance cannot suppress the base class functionality. A derived class may not be able to access all the base class data. Inheritance cannot extend the base class functionality. In inheritance chain construction of object happens from base towards derived.
Assume class B is inherited from class A. Which of the following statements is correct about construction of an object of class B?
Which of the following can be facilitated by the Inheritance mechanism? Use the existing functionality of base class. Overrride the existing functionality of base class. Implement new functionality in the derived class. Implement polymorphic behaviour. Implement containership.
Which of the following is correct about the C#.NET snippet given below? namespace CuriousTabConsoleApplication { class Baseclass { public void fun() { Console.WriteLine("Hi" + " "); } public void fun(int i) { Console.Write("Hello" + " "); } } class Derived: Baseclass { public void fun() { Console.Write("Bye" + " "); } } class MyProgram { static void Main(string[ ] args) { Derived d; d = new Derived(); d.fun(); d.fun(77); } } }
If a base class and a derived class each include a member function with the same name, the member function of the derived class will be called by an object of the derived class
Private members of base class cannot be accessed by derived class member functions or objects of derived class.
There is no multiple inheritance in C#.NET. That is, a class cannot be derived from multiple base classes.
The size of a derived class object is equal to the sum of sizes of data members in base class and the derived class.
Multiple inheritance is different from multiple levels of inheritance.
Discussion & Comments
No comments yet. Be the first to comment!
Name:
Comment:
Post Comment
Join Discussion
Discussion & Comments