Machine-translated by Google. Questions are authored in English.
Top

Discussion

An abstract class is which of the following?

  • A.A class that has direct instances, but whose descendants may have direct instances.
  • B.A class that has no direct instances, but whose descendants may have direct instances.
  • C.A class that has direct instances, but whose descendants may not have direct instances.
  • D.A class that has no direct instances, but whose descendants may not have direct instances

Answer: B

Correct answer: A class that has no direct instances, but whose descendants may have direct instances.

An abstract class exists to be inherited from, gathering common attributes and operations for its subclasses. It cannot be instantiated itself, since it is incomplete by design, but its concrete descendants can be. The name is conventionally shown in italics in UML.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.