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?
- A. Both are associations
- B. Both are generalisations
- C. Dependency and composition respectively
- 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.
Practise more Software Engineering, Git and Cloud Basics questionsSoftware Engineering, Git and Cloud Basics: notes and key points
More Software Engineering, Git and Cloud Basics questions
- Student and Course have a many-to-many association with an association class Enrollment holding the grade. If 30 students each enrol in 4…
- A change to how GST is calculated forces small edits in nine different classes across the code base. Which code smell is this, and how…
- Match each code smell with the refactoring that usually fixes it. P: a method takes 9 parameters, several of which always travel together…
- Using the Chidamber-Kemerer metric CBO (coupling between objects: the number of other classes a class is coupled to, counting both classes…
- Class Cart has 5 methods. Together they call 9 methods of other classes, of which 7 are distinct. What is its Response For a Class (RFC) =…
- A class has four methods with cyclomatic complexities 1, 3, 2 and 4. Using the CK metric Weighted Methods per Class (WMC) with cyclomatic…