GRE Computer Science Question 52
52. The subtype principle describes when one type may be substituted for another. Which of the following is true? (A) An instance of a subtype may be used in any expression in which an instance of the supertype may be used because the subtype must support a superset of the operations supported by the supertype. (B) An instance of a subtype may be used in any expression in which an instance of the supertype may be used because the subtype must support a subset of the operations supported by the supertype. (C) An instance of a supertype may be used in any expression in which an instance of the subtype may be used because the subtype must support a superset of the operations supported by the supertype. (D) An instance of a supertype may be used in any expression in which an instance of the subtype may be used because the subtype must support a subset of the operations supported by the supertype. (E) Instances of subtypes and supertypes may be used interchangeably.
Download
0 formatsNo download links available.