What are the advantages of inheritance?
Answer Posted / shantanu
Anything that has state,behaviour,responsibilty and
identity is called an object.Getting the state and
behaviour of one, is called as inheritance.
Inheritance is the process of creating new class called as
derioved class from the existing one called as base class.
The derived class inherits all capability of base class or
add totally new feature of its own.
| Is This Answer Correct ? | 51 Yes | 21 No |
Post New Answer View All Answers
what is the drawback of classical methods in oops?
How is class defined?
What is coupling in oops?
What is overloading in oops?
Which method cannot be overridden?
Can we override main method?
#include
write knight tour problem which is present in datastructure
What is pointer in oop?
What is polymorphism programming?
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.
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?
How is polymorphism achieved?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?