Closed bangyiwu closed 3 years ago
Take each class diagram, and ask yourself "can the given object diagram result from this class diagram?"
The answer for a and b is "yes" but it's "no" for c.
The reason why the object diagram could not have come from c is because c requires every Table
object to be linked to exactly one Door
object.
So because no data is given about door in the original diagram, to assume it is anything (or *) would be a correct assumption, regardless if there is actually an association or not?
I wouldn't say that it is assumed to be *, but because nothing is connected to Door
in the object diagram, any class diagram that mandates an association with Door
is immediately wrong (in this case (c)).
I wouldn't say that it is assumed to be *, but because nothing is connected to
Door
in the object diagram, any class diagram that mandates an association withDoor
is immediately wrong (in this case (c)).
Yes, that's the reason. Note the following:
Deadline
objects although the Deadline
class is in the class diagram of the iP. As long as the object diagram doesn't violate any rules in the class diagram, it could have come from that class diagram.I wouldn't say that it is assumed to be *, but because nothing is connected to
Door
in the object diagram, any class diagram that mandates an association withDoor
is immediately wrong (in this case (c)).
So am I right to say that in b, because the multiplicity is anything that it could also mean they are not associated with each other too? We just unsure at that point so anything is still plausible
So am I right to say that in b, because the multiplicity is anything that it could also mean they are not associated with each other too? We just unsure at that point so anything is still plausible
hmmm... multiplicity *
near the Door
(in the class diagram) means a givenTable
object (in the object diagram) can be connected to any number of Door
objects, including zero Door
objects i.e., a Table
can exist without being connected to a Door
at all.
So am I right to say that in b, because the multiplicity is anything that it could also mean they are not associated with each other too? We just unsure at that point so anything is still plausible
hmmm... multiplicity
*
near theDoor
(in the class diagram) means a givenTable
object (in the object diagram) can be connected to any number ofDoor
objects, including zeroDoor
objects i.e., aTable
can exist without being connected to aDoor
at all.
Alright that clears it up, thanks
I am quite confused on why the multiplicity of door must be one. The object diagram does not show any information regarding the door class.