CS FundamentalsHardProduct-company design interview

Student and Course have a many-to-many association with an association class Enrollment holding the grade. If 30 students each enrol in 4 courses, how many Enrollment objects exist?

  1. A. 34
  2. B. 120
  3. C. 4
  4. D. 30

Correct answer: B. 120

An association class has one instance per link, i.e. per (student, course) pair actually related: 30 x 4 = 120. It is not per class (2) or per side (34).

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic