View the step-by-step solution to:

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...

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 bas

e 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?

Top Answer

A private member in base class cannot be accessed directly from derived class, this is possible only by using getters and... View the full answer

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online