Chapter 15: Problem 4
What is the difference between a protected class member and a private class member?
/*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
Learning Materials
Features
Discover
Chapter 15: Problem 4
What is the difference between a protected class member and a private class member?
All the tools & learning materials you need for study success - in one app.
Get started for free
Complete the table below by filling in private, protected, public, or inaccessible in the right-hand column: $$\begin{array}{ll} \hline \text { In a public base class, this base class } & \ldots \text { becomes this access specification in } \\ \text { MEMBER access specification... } & \text { the derived class. } \\ \hline \text { private } & & \\ \text { protected } & & \\ \text { public } & & \\ \hline \end{array}$$
A program uses two classes: Dog and poodle. Which class is the base class and which is the derived class?
Write the first line of the declaration for a poodle class. The class should be derived from the Dog class with public base class access.
A derived class inherits the ______of its base class.
______________ is when member functions in a class hierarchy behave differently, depending upon which object performs the call.
What do you think about this solution?
We value your feedback to improve our textbook solutions.