Does polymorphism work if some of the classes in an inheritance hierarchy are abstract?

What will be an ideal response?


Yes. A reference variable can be declared at any level in the inheritance hierarchy. If it is declared to be of an
abstract class, it can still be used to refer to objects of concrete classes.

Computer Science & Information Technology

You might also like to view...

Which of the following statements is false?

a. In the UML, each class is modeled in a class diagram as a rectangle with three compartments. The top one contains the class’s name centered horizontally in boldface. The middle one contains the class’s attributes, which correspond to instance variables in Java. The bottom one contains the class’s operations, which correspond to methods and constructors in Java. b. UML represents instance variables as an attribute name, followed by a colon and the type. c. Private attributes are preceded by the keyword private in the UML. d. The UML models operations by listing the operation name followed by a set of parentheses. A plus sign (+) in front of the operation name indicates that the operation is a public.

Computer Science & Information Technology

What information about the decision maker does the analyst seek to gain from observation?

What will be an ideal response?

Computer Science & Information Technology

Email is considered private, and therefore safe to use as a medium for discussing sensitive information.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Information warfare is divided into ________ categories.

A. five B. four C. six D. seven

Computer Science & Information Technology