Knowee
Questions
Features
Study Tools

When deriving a class from with protected inheritance, public members of the base class become___________ members of the derived class, and protected members of the base class become _____________ members of the derived class. a.private, private b.protected, protectedc.public, private d.private, protected Clear my choice

Question

When deriving a class from with protected inheritance, public members of the base class become___________ members of the derived class, and protected members of the base class become _____________ members of the derived class. a.private, private b.protected, protectedc.public, private d.private, protected Clear my choice

🧐 Not the exact question you are looking for?Go ask a question

Solution

The correct answer is a. When deriving a class with protected inheritance, public members of the base class become private members of the derived class, and protected members of the base class become private members of the derived class.

Similar Questions

Which of the following statements is correct, when a class is inherited publicly?Select one:Public members of the base class become public members of derived class.Public members of the base class become private members of derived class.Private members of the base class become protected members of derived class.Public members of the base class become protected members of derived class.

Explain the visibility of base class members for the access specifiers: private, protected and public while creating the derived class and also explain the syntax for creating derived class.

Which of the following statements is true regarding protected members in inheritance? (2 Points) a) Protected members can only be accessed by the derived class. b) Protected members can be accessed by any class in the same namespace. c) Protected members can be accessed by any class derived from the base class. d) Protected members can be accessed by any class in the program.

Assuming the definition,class BasePlusCommissionEmployee : public CommissionEmployeewhich of the following is false?a.The colon ( : ) in the header of the class definition indicates inheritance.b.The keyword public indicates the type of inheritance.c.All the public and protected members of class BasePlusCommissionEmployee are inherited as public and protected members, respectively, into class CommissionEmployee.d.CommissionEmployee is the base class and BasePlusCommissionEmployee is the derived class.Clear my choice

When an object of a derived class is instantiated, the __________ constructor initializes the _________ members.a.Base class, base class.b.Derived class, base class.c.Base class, derived class.d.Derived class, public.

1/3

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.