What is the difference between private and protected Be spec

What is the difference between private and protected? Be specific in terms of inheritance.

Solution

main difference between protected and private in terms of inheritance is as follows:

A protected member is accessible by the only the functions within its class and by any class which is derived from it imeediately whereas this is not the case with the protected members.

members inherited in protected mode can be inherited for further inheritance which is not the case with the private inheritance.

What is the difference between private and protected? Be specific in terms of inheritance.Solutionmain difference between protected and private in terms of inhe

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site