Difference between over loading and over ridding?
Answer Posted / rameshwar gaikwad
Difference
Method OverLoading
1. Same method name with different number of argument
2. Number of argument with different datatype
3. Each method may returns different type of value
4. All overloaded methods founds to be in one class.
Method OverRiding
1. Same method name with same number of argument
2. Number of argument with same datatype
3. Each method must returns same type of value
4. Each overrided method of base class founds in respective
derived class.
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
What is encapsulation c#?
What is the benefit of oop?
Give an example where we have to specifically use C programming language and C++ programming language cannot be used?
What is encapsulation selenium?
Can enum be null?
What is the difference between encapsulation and polymorphism?
when to use 'mutable' keyword and when to use 'const cast' in c++
Where You Can Use Interface in your Project
What is coupling in oop?
Can static class have constructor?
Is abstract thinking intelligence?
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 solid in oops?
What are benefits of oop?
What is a function in oop?