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

1. (TCO 2) A class object can be _____. That is, it can be created once, when th

ID: 3542914 • Letter: 1

Question


1. (TCO 2) A class object can be _____. That is, it can be created once, when the control reaches its declaration, and destroyed when the program terminates. (Points : 4)       static
      automatic
      local
      public

2. (TCO 3) Which of the following may not be used as a class data member? (Points : 4)       struct
      class
      namespace
      arrays

3. (TCO 4) A derived class can redefine (Points : 4)       a private member function of the base class.
      a public member function of the base class.
      both public and private member functions of the base class.
      neither public nor private member functions of the base class.

4. (TCO 4) The existing classes, from which you create new classes, are called the _____ classes. (Points : 4)       child
      base
      sibling
      derived

5. (TCO 4) Which of the following is not true about public inheritance? (Points : 4)       All public member functions of the base class become the public member functions of the derived class.
      All public member variables of the base class become the public member variables of the derived class.
      All public members of the base class become the public members of the derived class.
      The public member variables of the base class become the private member variables of the derived class.

6. (TCO 4) Which of the following statements about inheritance is true if the memberAccessSpecifier is protected? (Points : 4)       The private members of the base class become protected members of the derived class.
      The derived class can directly access any member of the base class.
      The public members of the base class become protected members of the derived class.
      The protected members of the base class become private members of the derived class.

7. (TCO 4) Consider the following class definition:
class dClass: bClass
{
//class members list
};

The class dClass is derived from the class bClass using the _____ type of inheritance.(Points : 4)       public
      private
      protected
      static

8. (TCO 4) Which one of the following statements is a correct example of inheritance?(Points : 4)       An automobile has an engine.
      An automobile is a Mustang.
      A Mustang is an automobile.
      An engine is part of an automobile.

9. (TCO 4) Which of the following relationships is not a correct example of inheritance?(Points : 4)       Parent to Children
      Aunt to Uncle
      Grandparent to Grandchild
      Father and Mother to Children

10. (TCO 8) In a multifile, object-oriented C++ project, which file contains the class implementation? (Points : 4)       classname.hdr
      classname.h
      classname.def
      classname.cpp

Explanation / Answer

1.static

2)struct

3)a public member function of the base class.

4)derived

5)All public member variables of the base class become the public member variables of the derived class.

6)The public members of the base class become protected members of the derived class.

7)public

8)An engine is part of an automobile

9)Aunt to Uncle

10)classname.h