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

1. (TCO 7) An instance of an abstract class can be created using _____. (Points

ID: 3560604 • Letter: 1

Question

1. (TCO 7) An instance of an abstract class can be created using _____. (Points : 2)        the new operator
       encapsulation
       a public accessor
       None of the above Question 2.2. (TCO 7) What is an abstract class? (Points : 2)        A generalized class used only to create related derived classes
       A class without any superclasses
       A class from which we create many instances
       Any subclass with more than one superclass Question 3.3. (TCO 7) Which of the following statements is true? (Points : 2)        A pure virtual function is a function without function implementation and ends with =0;
       An actual object can be created from an abstract class.
       A pure virtual function is a function that cannot be inherited and therefore must be overloaded.
       A pure virtual function cannot be overridden. Question 4.4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)        Poodle
       Appliance
       RedMarker
       AeroStarMiniVan Question 5.5. (TCO 7) When using _____, developers are required to comply with the rules defined in a framework. (Points : 2)        inheritance
       base classes
       object-oriented constructs
       contracts
       None of the above Question 6.6. (TCO 7) Which is the prototype for a pure virtual function in class TVGame called StartGame which has no inputs and returns a bool? (Points : 2)        bool virtual StartGame()
       virtual bool StartGame() = 0;
       virtual bool TVGame::StartGame() {}
       bool virtual TVGame::StartGame(string) = 0; Question 7.7. (TCO 7) Which language(s) allow(s) implementation of multiple inheritance using only base classes? (Points : 2)        Java
       .Net
       C++
       All of the above Question 8.8. (TCO 7) Which of the following class represent an abstract class? (Points : 2)        class Automobile {
void drive();
}
       class Automobile {
void drive ()=0;
}
       class Automobile {
virtual void drive ()=0;
}
       class Automobile {
void drive (){}
} Question 9.9. (TCO 7) Which of the following declares an abstract method in an abstract C++ class? (Points : 2)        public: void print();
       public: void print() {}
       public: virtual void print() {}
       public: virtual void print()=0; Question 10.10. (TCO 7) What is the coding requirement(s) that a programmer must follow when writing virtual functions? (Points : 2)        The programmer must use a "virtual" keyword in the parent class.
       The parent class must have specific implementation coded in the .cpp file.
       The base class must use a different name for the function than the parent class.
       There are no specific coding requirements for using the "virtual" keyword. 1. (TCO 7) An instance of an abstract class can be created using _____. (Points : 2)        the new operator
       encapsulation
       a public accessor
       None of the above

Explanation / Answer

1. (TCO 7) An instance of an abstract class can be created using _____. (Points : 2)
       None of the above
Question 2.2. (TCO 7) What is an abstract class? (Points : 2)
       A generalized class used only to create related derived classes
Question 3.3. (TCO 7) Which of the following statements is true? (Points : 2)
       A pure virtual function is a function without function implementation and ends with =0;
Question 4.4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)
       Appliance
Question 5.5. (TCO 7) When using _____, developers are required to comply with the rules defined in a framework. (Points : 2)
       contracts
Question 6.6. (TCO 7) Which is the prototype for a pure virtual function in class TVGame called StartGame which has no inputs and returns a bool? (Points : 2)
       virtual bool StartGame() = 0;
Question 7.7. (TCO 7) Which language(s) allow(s) implementation of multiple inheritance using only base classes? (Points : 2)
      C++
Question 8.8. (TCO 7) Which of the following class represent an abstract class? (Points : 2)
       class Automobile {
virtual void drive ()=0;
}

Question 9.9. (TCO 7) Which of the following declares an abstract method in an abstract C++ class? (Points : 2)
       public: virtual void print()=0;
Question 10.10. (TCO 7) What is the coding requirement(s) that a programmer must follow when writing virtual functions? (Points : 2)
       The programmer must use a "virtual" keyword in the parent class.