CS FundamentalsHardGATE CS

A UML class diagram says each Course has 1..3 Instructors and each Instructor teaches 0..4 Courses (many-to-many). Which configuration is VALID?

  1. A. A course with no instructor yet
  2. B. An instructor teaching 5 courses
  3. C. Two instructors sharing three courses, one instructor teaching no course
  4. D. A course with 4 instructors

Correct answer: C. Two instructors sharing three courses, one instructor teaching no course

The multiplicity next to Instructor (1..3) bounds the instructors per course and the one next to Course (0..4) bounds courses per instructor. Option C keeps every course at 1–2 instructors and every instructor at 0–3 courses; the others break a bound.

More Software Engineering, Git and Cloud Basics questions

Exams that ask this topic