Which of the following can be facilitated by the Inheritance mechanism?
Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities?
What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication { class Baseclass { public void fun() { Console.Write("Base class" + " "); } } class DerivedBaseclass { new void fun() { Console.Write("Derived1 class" + " "); } } class DerivedDerived1 { new void fun() { Console.Write("Derived2 class" + " "); } } class Program { public static void Main(string[ ] args) { Derived2 d = new Derived2(); d.fun(); } } }
There is no multiple inheritance in C#.NET. That is, a class cannot be derived from multiple base classes.
If a base class contains a member function func(), and a derived class does not contain a function with this name, an object of the derived class cannot access func().
Multiple inheritance is different from multiple levels of inheritance.
How can you prevent inheritance from a class in C#.NET ?
Which of the following should be used to implement a 'Has a' relationship between two entities?
Which of the following statements should be added to the subroutine fun( ) if the C#.NET code snippet given below is to output 9
class BaseClass { protected int i =} class Derived: BaseClass { int i = public void fun() { // [*** Add statement here ***] } }
Creating a derived class from a base class requires fundamental changes to the base class.
It is illegal to make objects of one class as members of another class.
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
The size of a derived class object is equal to the sum of sizes of data members in base class and the derived class.
An object of a derived class cannot access private members of base class.
The way a derived class member function can access base class public members, the base class member functions can access public member functions of derived class.
Which of the following statements are correct about Inheritance in C#.NET?
Which of the following is correct about the C#.NET snippet given below?
namespace IndiabixConsoleApplication { 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); } } }
Which of the following statements are correct about the C#.NET code snippet given below?
namespace IndiabixConsoleApplication { class index { protected int count; public index() { count = } } class indexindex { public void increment() { count = count + } } class MyProgram { static void Main(string[] args) { index1 i = new index1(); i.increment(); } } }
Private members of base class cannot be accessed by derived class member functions or objects of derived class.
A class D can be derived from a class C, which is derived from a class B, which is derived from a class A.
Please disable the adBlock and continue. Thank you.