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
2. Give the different notations for the class.\
What is the use of oops?
Why it is called runtime polymorphism?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What is encapsulation in oops?
What is abstract class in oops?
What is the real life example of polymorphism?
What are the types of abstraction?
What are the important components of cohesion?
What is encapsulation in simple terms?
What do you mean by variable?
Give two or more real cenario of virtual function and vertual object
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.
What is class and object in oops?
class type to basic type conversion