ITPEC FE Morning October 2021 Question 25
ITPEC FE Morning October 2021 — Question 25 of 80
UML Multiplicity — determine cardinalities from real-world constraints.
Given: Continent — Country — City, no cross-continental countries, each continent has ≥1 country, each country has ≥1 city.
Continent → Country (A, B):
- A = 1..1 — each country belongs to exactly one continent (no cross-continental)
- B = 1..* — each continent has at least one country
Country → City (C, D):
- C = 1..1 — each city belongs to exactly one country
- D = 1..* — each country has at least one city
Answer: b) A=1..1, B=1.., C=1..1, D=1..
Why not others:
- (a) D = 1..1 — forces exactly one city per country, but "at least one" means 1..*
- (c) B = 0..* — allows continents with zero countries, violates "at least one"
- (d) B = 0..* and D = 0..* — violates both "at least one" constraints
Key rule: Read multiplicity from each end: "belongs to" side is usually 1..1, "has" side reflects the minimum constraint (1..* for "at least one", 0..* for "zero or more").
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.