What is multiple inheritance?

Answer Posted / jitendra rajurkar

In .Net realm a child class can inherit methods and
properties from only one parent class and that parent class
can be either abstract class or any other class.Also Child
class can inherit methods and properties from multiple
interfaces.

class DerivedClass:AbstractClass,InterafaceA,InterfaceB
{
public void main()
{
DerivedClass obj o = new DerivedClass();
o.MethodfromAbstractclass;
o.MehtodfromInterfaceA;
o.MethodfromInterfaceB;
}
}

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

2. Give the different notations for the class.\

1582


What is the use of oops?

614


Why it is called runtime polymorphism?

573


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1826


What is encapsulation in oops?

531






What is abstract class in oops?

593


What is the real life example of polymorphism?

602


What are the types of abstraction?

550


What are the important components of cohesion?

548


What is encapsulation in simple terms?

532


What do you mean by variable?

567


Give two or more real cenario of virtual function and vertual object

1849


Question: Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and Monthly. An appointment has a description (for example, “see the dentist”) and a date and time. Write a virtual function occurs_on(int year, int month, int day) that checks whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of Appointment* with a mixture of appointments. Have the user enter a date and print out all appointments that happen on that date.

622


What is class and object in oops?

605


class type to basic type conversion

1833