Assessnik Portion (3 points each) 1. Select the false statement regarding inheri
ID: 3914695 • Letter: A
Question
Assessnik Portion (3 points each) 1. Select the false statement regarding inheritance. contain more attributes and behaviors than its base class. a. A derived class can b. A derived class can be the base class for other derived classes. c. Some derived classes can have multiple base classes. d. Base classes are usually more specific than derived classes 2. Which of the following is not a kind of inheritance in C++? a. public. c. static. b. private. d. protected 3. The is-a relationship represents: a. Composition. c. Information Hiding. d. A friend 4. Assuming the following is the beginning of the constructor definition for class BasePlus-CommissionEmployee which inherits from class Point BPCEmployee:BPCEmployeel string name, string ssn, double rate, double salary) CommissionEmployee( name, ssn, rate ) The second line(: CommissionEmployee(...).) a. Invokes the CommissionEmployee constructor with arguments b. Causes a compiler error c. Is unnecessary because the CommissionEmployee constructor is called automatically d. Indicates inheritance. 5. protected base class members cannot be accessed by a. Functions that are neither friends of the base class, derived-class member functions nor friends of a derived class. b. friends of the base class. c. Functions that are not derived-class member functions. d. friends of derived classes. 6. When an object of a derived class is instantiated, the initializes the constructor members by calling the a. Base class, base class, derived. b. Derived class, base class, base. c. Base class, derived class, derived. d. Derived class, public, derived. 7. Polymorphism is implemented via: a. Member functions. b. virtual functions and dynamic binding.Explanation / Answer
Solution: -
1 d) Base classes are usually more specific than derived class.
2 c) Static
Ans) Static keyword does not belongs to inheritance.
3 b) Inheritance
Ans) Is-a relationship supports inheritance.
5 a) Functions that are neither friends of the base class, derived-class member.
Ans) protected base class cannot be accessed by functions that are neither friends of base class and derived-class memeber nor friends of a derived class.
6 a) Base class, base class, derived
7 b) Virtual function and dynamic binding
Ans) generally, polymorphism is implemented using virtual function. Virtual keyboard are used along with Base class's member function.