1. (TCO 7) An instance of an abstract class can be created using _____. (Points
ID: 3667546 • 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
Interfaces are written in individual files, just like classes.
The name of an interface often begins with a lowercase “i”.
Interfaces can be used to implement a form of multiple inheritance.
Interfaces are instantiated just like any other class.
A class without any subclasses
A conceptually vague or generalized class
Any superclass with more than one subclass
Explanation / Answer
1. An instance of an abstract class can be created using None of the above.
2. What is an abstract class? A conceptually vague or generalized class.
3. What is an abstract method? A method without a body that is declared with the reserved word abstract.
4. Which of the following classes is most likely an abstract class? Tree.
5. In terms of object-oriented programming, a contract is a mechanism that forces a programmer to adhere to a predefined application programming interface or _____. Framework.
6. An abstract method can be declared in which of the following? Abstract classes and Interfaces (A and C)
7. Some object-oriented languages such as C++ allow for _____ while other object-oriented languages such as Java and .NET do not. multiple inheritance.
8. Which of the following class definitions defines a legal abstract class?
public abstract class Automobile {
void drive (){}
}
9. Which of the following declares an abstract method in an abstract Java class?
public abstract void pay();
10. Which of the following statements is false?
Interfaces are instantiated just like any other class.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.