Inheritance relationships are represented in the UML notation by:

  1. nesting of classes

  2. lines with a solid diamond at one end

  3. lines with a hollow diamond at one end

  4. lines with a triangular arrow at one end

  5. lines with a triangular arrow at both ends


Correct Option: D

AI Explanation

To answer this question, you need to understand how inheritance relationships are represented in UML (Unified Modeling Language) notation.

Option A) Nesting of classes - This option is incorrect because nesting of classes represents a composition relationship, not an inheritance relationship.

Option B) Lines with a solid diamond at one end - This option is incorrect because lines with a solid diamond at one end represent an aggregation relationship, not an inheritance relationship.

Option C) Lines with a hollow diamond at one end - This option is incorrect because lines with a hollow diamond at one end represent a composition relationship, not an inheritance relationship.

Option D) Lines with a triangular arrow at one end - This option is correct. Lines with a triangular arrow at one end represent an inheritance relationship in UML notation. The arrow points from the subclass (the class that inherits) to the superclass (the class being inherited from).

Option E) Lines with a triangular arrow at both ends - This option is incorrect. Lines with a triangular arrow at both ends represent an association relationship, not an inheritance relationship.

The correct answer is Option D. This option is correct because lines with a triangular arrow at one end represent an inheritance relationship in UML notation.

Find more quizzes: