Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Question 1. 1. Which of the following is true about inheritance? (Points : 3) a.

ID: 3558352 • Letter: Q

Question

Question 1.1. Which of the following is true about inheritance?   (Points : 3)        a. Child classes are more generalized than their associated parent classes.
       b. Inheritance demonstrates the generalization/specialization relationship.
       c. Parent classes are more specialized than their associated child classes.
       d. Parent classes contain more functionality than child classes. Question 2.2. Which of the following term(s) can be used to describe inheritance relationships between classes?  (Points : 3)        a. parent/child
       b. super/sub
       c. base/derived
       d. All of the above Question 3.3. Which of the following design rules apply to inheritance?  (Points : 3)        a. Common functionality needs to be pushed to the parent class.
       b. In an inheritance hierarchy, you need not stop at deriving/extending from one class.
       c. A child class can itself be a parent class.
       d. All of the above Question 4.4. Select the parent class.  (Points : 3)        a. Automobile  
       b. Convertible
       c. MiniVan
       d. Sedan Question 5.5. What is/are the reason(s) to use inheritance?  (Points : 3)        a. Labor division/sharing work
       b. Introducing modularity into program
       c. Reusing design
       d. All of the above Question 6.6. Inheritance always involves a _____ relationship.  (Points : 3)        a. general to general
       b. specific to specific
       c. specific to general
       d. general to specific Question 7.7. If class B inherits from class A, which of the following statements is true?  (Points : 3)        a. Class A has access to the methods and data members of class B.
       b. Class A has access to the methods and data members of class B and class B's subclasses.
       c. Class B does not have access to the methods and data members of class A.
       d. Class B has access to the public and protected methods and data members of class A.
Question 8.8. From most protection to least, the order of access modifiers is  (Points : 3)        a. protected, private, public
       b. private, protected, public  
       c. private, public, protected
       d. protected, public, private Question 9.9. The _____ accessibility establishes that an attribute can only be accessed from methods of the class itself.  (Points : 3)        a. private  
       b. protected
       c. public
       d. secured Question 10.10. _____ is the least secure member access specifier. (Points : 3)        a. public  
       b. friend
       c. private
       d. protected Question 11.11. _____ is based on the principle that knowledge of a general category can be applied to more specific objects.  (Points : 3)        a. Polymorphism
       b. Encapsulation
       c. Information hiding
       d. Inheritance Question 12.12. Inheritance is only possible in _____ languages.  (Points : 3)        a. procedural
       b. object-oriented    
       c. GUI based
       d. non-structured Question 13.13. _____ is the ability to use the same expression to denote different operations depending on the type of object calling the expression.  (Points : 3)        a. Inheritance
       b. Encapsulation
       c. Polymorphism  
       d. Composition Question 14.14. C++ supports _____.  (Points : 3)        a. both single and multiple inheritance  
       b. only single inheritance
       c. only multiple inheritance
       d. neither single nor multiple inheritance Question 15.15. class dClass: bClass
{
//class members list
} ;
The class dClass is derived from the class bClass using the ____ type of inheritance.  (Points : 3)        a. public
       b. private  
       c. protected
       d. static Question 16.16. If the derived class classD overrides a public member function, functionName, of the base class classB, then to specify a call to that public member function of the base class, you use the ____ statement.   (Points : 3)        a. classD::functionName();
       b. classB::functionName();  
       c. classD.functionName();
       d. classB.functionName(); Question 17.17. The constructors of a derived class _____.   (Points : 3)        a. cannot directly initialize private members that are inherited from the base class
       b. can directly initialize any members that are inherited from the base class
       c. cannot directly initialize public members that are inherited from the base class
       d. can directly initialize private member functions that are inherited from the base class Question 18.18. To overload a member function of the base class, _____.    (Points : 3)        a. the name of the function and the formal parameter list of the corresponding function in the derived class must be same
       b. the name of the function must be different, and the formal parameter list of the corresponding function in the derived class must be same
       c. the name of the function and the formal parameter list of the corresponding function in the derived class must be different
       d. the name of the function must be the same, and the formal parameter list of the corresponding function in the derived class must be different
Question 19.19. The private members of a base class can _____.   (Points : 3)        a. never be accessed by a derived class
       b. be directly and indirectly accessed by a derived class
       c. be indirectly accessed by a derived class
       d. be directly accessed by a derived class Question 20.20. Single inheritance means _____.   (Points : 3)        a. that the derived class is derived from a single base class  
       b. that only multiple classes can be derived from the given base class
       c. that only one base class can be derived
       d. Single inheritance is not possible in C++ Question 1.1. Which of the following is true about inheritance?   (Points : 3)        a. Child classes are more generalized than their associated parent classes.
       b. Inheritance demonstrates the generalization/specialization relationship.
       c. Parent classes are more specialized than their associated child classes.
       d. Parent classes contain more functionality than child classes.

Explanation / Answer

Question 1.1. Which of the following is true about inheritance?   (Points : 3)        a. Child classes are more generalized than their associated parent classes.        b. Inheritance demonstrates the generalization/specialization relationship.        c. Parent classes are more specialized than their associated child classes.        d. Parent classes contain more functionality than child classes. Question 2.2. Which of the following term(s) can be used to describe inheritance relationships between classes?  (Points : 3)        a. parent/child        b. super/sub        c. base/derived        d. All of the above Question 3.3. Which of the following design rules apply to inheritance?  (Points : 3)        a. Common functionality needs to be pushed to the parent class.        b. In an inheritance hierarchy, you need not stop at deriving/extending from one class.        c. A child class can itself be a parent class.        d. All of the above Question 4.4. Select the parent class.  (Points : 3)        a. Automobile          b. Convertible        c. MiniVan        d. Sedan Question 5.5. What is/are the reason(s) to use inheritance?  (Points : 3)        a. Labor division/sharing work        b. Introducing modularity into program        c. Reusing design        d. All of the above Question 6.6. Inheritance always involves a _____ relationship.  (Points : 3)        a. general to general        b. specific to specific        c. specific to general        d. general to specific Question 7.7. If class B inherits from class A, which of the following statements is true?  (Points : 3)        a. Class A has access to the methods and data members of class B.        b. Class A has access to the methods and data members of class B and class B's subclasses.        c. Class B does not have access to the methods and data members of class A.        d. Class B has access to the public and protected methods and data members of class A. Question 8.8. From most protection to least, the order of access modifiers is  (Points : 3)        a. protected, private, public        b. private, protected, public          c. private, public, protected        d. protected, public, private Question 9.9. The _____ accessibility establishes that an attribute can only be accessed from methods of the class itself.  (Points : 3)        a. private          b. protected        c. public        d. secured Question 10.10. _____ is the least secure member access specifier. (Points : 3)        a. public          b. friend        c. private        d. protected Question 11.11. _____ is based on the principle that knowledge of a general category can be applied to more specific objects.  (Points : 3)        a. Polymorphism        b. Encapsulation        c. Information hiding        d. Inheritance Question 12.12. Inheritance is only possible in _____ languages.  (Points : 3)        a. procedural        b. object-oriented            c. GUI based        d. non-structured Question 13.13. _____ is the ability to use the same expression to denote different operations depending on the type of object calling the expression.  (Points : 3)        a. Inheritance        b. Encapsulation        c. Polymorphism        d. Composition Question 14.14. C++ supports _____.  (Points : 3)        a. both single and multiple inheritance          b. only single inheritance        c. only multiple inheritance        d. neither single nor multiple inheritance Question 15.15. class dClass: bClass { //class members list } ; The class dClass is derived from the class bClass using the ____ type of inheritance.  (Points : 3)        a. public        b. private        c. protected        d. static Question 16.16. If the derived class classD overrides a public member function, functionName, of the base class classB, then to specify a call to that public member function of the base class, you use the ____ statement.   (Points : 3)        a. classD::functionName();        b. classB::functionName();        c. classD.functionName();        d. classB.functionName(); Question 17.17. The constructors of a derived class _____.   (Points : 3)        a. cannot directly initialize private members that are inherited from the base class        b. can directly initialize any members that are inherited from the base class        c. cannot directly initialize public members that are inherited from the base class        d. can directly initialize private member functions that are inherited from the base class Question 18.18. To overload a member function of the base class, _____.    (Points : 3)        a. the name of the function and the formal parameter list of the corresponding function in the derived class must be same        b. the name of the function must be different, and the formal parameter list of the corresponding function in the derived class must be same        c. the name of the function and the formal parameter list of the corresponding function in the derived class must be different        d. the name of the function must be the same, and the formal parameter list of the corresponding function in the derived class must be different Question 19.19. The private members of a base class can _____.   (Points : 3)        a. never be accessed by a derived class        b. be directly and indirectly accessed by a derived class        c. be indirectly accessed by a derived class        d. be directly accessed by a derived class Question 20.20. Single inheritance means _____.   (Points : 3)        a. that the derived class is derived from a single base class          b. that only multiple classes can be derived from the given base class        c. that only one base class can be derived        d. Single inheritance is not possible in C++

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote