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: 3554549 • 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 subclasses
       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 false? (Points : 2)        An abstract method is a method signature without a method body and can be found in an abstract class.
       If a subclass extends an abstract base class, the subclass must implement the abstract method(s) from the base class, or else call itself abstract also.
       Any method in an abstract class is considered an abstract method.
       Abstract methods are inherited. Question 4.4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)        Vehicle
       BlueSpruce
       HandSaw
       Goldfish 5. (TCO 7) In terms of object-oriented programming, a contract is a mechanism that forces a programmer to adhere to a predefined application programming interface or _____.(Points : 2)        method signature
       class declaration
       framework
       object instantiation method
       None of the above Question 6.6. (TCO 7) An abstract method can be declared in which of the following? (Points : 2)        A. Abstract classes
       B. Any base class
       C. Interfaces
       A and B
       A and C
       B and C
       A, B, and C Question 7.7. (TCO 7) C++ allows for the implementation of multiple inheritance whereas .Net and Java do not. However, in languages such as .Net and Java, _____ can be used to simulate multiple inheritance.  (Points : 2)        abstract methods
       base classes
       interfaces
       implementations 8. (TCO 7) Which of the following class definitions defines a legal abstract class? (Points : 2)        class abstract Dog {
void grow();
}
       public abstract class Dog {
void eat (){}
}
       abstract private class Dog {
void eat ();
}
       public class abstract Dog {
void eat (){}
} Question 9.9. (TCO 7) Which of the following declares an abstract method in an abstract Java class? (Points : 2)        public abstract calc();
       public abstract void calc();
       public void calc() {}
       public void abstract calc(); Question 10.10. (TCO 7) Which of the following statements is true? (Points : 2)        Interfaces contain a list of already implemented methods.
       Interfaces contain a list of pre-defined attributes with default values .
       All methods defined in an interface must be implemented by any class that chooses to implement the interface.
       At least one of the methods defined in an interface must be implemented by any class that chooses to implement the interface. 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)

       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 subclasses
       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 false? (Points : 2)

       An abstract method is a method signature without a method body and can be found in an abstract class.
       If a subclass extends an abstract base class, the subclass must implement the abstract method(s) from the base class, or else call itself abstract also.
       Any method in an abstract class is considered an abstract method.
       Abstract methods are inherited.

Question 4.4. (TCO 7) Which of the following classes is most likely an abstract class? (Points : 2)

       Vehicle
       BlueSpruce
       HandSaw
       Goldfish

5. (TCO 7) In terms of object-oriented programming, a contract is a mechanism that forces a programmer to adhere to a predefined application programming interface or _____.(Points : 2)

       method signature
       class declaration
       framework
       object instantiation method
       None of the above

Question 6.6. (TCO 7) An abstract method can be declared in which of the following? (Points : 2)

       A. Abstract classes
       B. Any base class
       C. Interfaces
       A and B
       A and C
       B and C
       A, B, and C

Question 7.7. (TCO 7) C++ allows for the implementation of multiple inheritance whereas .Net and Java do not. However, in languages such as .Net and Java, _____ can be used to simulate multiple inheritance.  (Points : 2)

       abstract methods
       base classes
       interfaces
       implementations

8. (TCO 7) Which of the following class definitions defines a legal abstract class? (Points : 2)

       class abstract Dog {
void grow();
}
       public abstract class Dog {
void eat (){}
}

       abstract private class Dog {
void eat ();
}
       public class abstract Dog {
void eat (){}
}

Question 9.9. (TCO 7) Which of the following declares an abstract method in an abstract Java class? (Points : 2)

       public abstract calc();
       public abstract void calc();
       public void calc() {}
       public void abstract calc();

Question 10.10. (TCO 7) Which of the following statements is true? (Points : 2)

       Interfaces contain a list of already implemented methods.
       Interfaces contain a list of pre-defined attributes with default values .
       All methods defined in an interface must be implemented by any class that chooses to implement the interface.
       At least one of the methods defined in an interface must be implemented by any class that chooses to implement the interface.

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