CS FundamentalsHardTCS Digital · Infosys

A class diagram shows a dashed line with a hollow triangle from PaymentService to the interface IPayment, and a solid line with a hollow triangle from Savings to Account. What do they mean?

  1. A. Both are associations
  2. B. Both are generalisations
  3. C. Dependency and composition respectively
  4. D. PaymentService realises (implements) IPayment; Savings is a generalisation (subclass) of Account

Correct answer: D. PaymentService realises (implements) IPayment; Savings is a generalisation (subclass) of Account

Dashed line + hollow triangle = realisation of an interface; solid line + hollow triangle = inheritance. A plain dashed arrow with an open head is a dependency.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic