Which of the following best describes the role of associations in a class diagram?
Think about how classes relate to each other in a system.
Associations in class diagrams represent how classes are connected or interact with each other, such as one class using or referencing another.
In a class diagram, what does a multiplicity of 1..* on an association mean?
Look at the range indicated by the numbers.
The notation 1..* means there must be at least one instance, but there can be many.
Given a class diagram where class Vehicle is connected to class Car with a solid line and a hollow triangle pointing to Vehicle, what does this indicate?
Recall the meaning of the hollow triangle arrow in UML.
The hollow triangle arrow points to the parent class, indicating inheritance. Here, Car inherits from Vehicle.
Which statement correctly distinguishes aggregation from composition in class diagrams?
Think about how the lifetime of parts relates to the whole.
Composition means the part cannot exist without the whole (strong lifecycle dependency), while aggregation means the part can exist independently.
In a class diagram, the class Order has attributes orderID and date, and methods calculateTotal() and addItem(). Which of the following best describes the responsibility of the Order class?
Look at both attributes and methods to understand the class role.
The attributes store order details, and methods like addItem() and calculateTotal() show it manages items and calculations related to the order.