Discuss the difference between overloading and overriding a


1) If a data member is declared as private, protected or public in a base class, discuss how it can or cannot be accessed in a public member function of a derived class.

2) Discuss the difference between overloading and overriding a member function in a derived class.

3) Give an example of a situation where it is necessary to define a virtual destructor.

4) What is the feature that makes a base class an abstract class?

5) When designing a class hierarchy involving classes A and B, what are the two questions that must be asked to determine whether class B should be derived from class A?

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Discuss the difference between overloading and overriding a
Reference No:- TGS02786398

Now Priced at $10 (50% Discount)

Recommended (96%)

Rated (4.8/5)