Question

If we define a boundary is an area in space
and a location is a point in space
..and a location is attached one boundary
and we maintain a boundary structure
..where any boundary can have one or more "parents/owners"
..and any boundary can have zero or more "children"
..and the boundary structure has a root boundary
..and the boundary structure terminated by many boundary leaves

then...

Given boundary 2 is owned by boundary 1
..and location A is attached to boundary 1
When I attach location A to a boundary 2
Then the location A is detached to boundary 1
..and location A is attached to boundary 2

likewise, vice versa...

Given boundary 4 is owned by boundary 3
..and location B is attached to boundary 4
When I attach location B to a boundary 3
Then the location B is detached to boundary 4
..and location B is attached to boundary 3

but

Given boundary 7 is owned by boundaries 5 and 6 (i.e. shared)
..and location C is associated to boundary 7
When I attempt to attach location C to either boundary 5 or 6
Then the attempt will not be successfull

Question: Is there a way of succinctly expressing all of this through a UML class diagram?

Was it helpful?

Solution

No, not only a UML class diagram, but...

If we define a boundary is an area in space and a location is a point in space ... This paragraph describes the entities and their relationships. You can model that with a class diagram.

Given boundary 4 is owned by boundary 3... and Given boundary 4 is owned by boundary 3... These paragraphs describe objects and their associations. You can describe that with a object diagrams. Obviously, the relationships between the objects in these two object diagrams should conform to the relationships of the classes presented in the class diagram.

Given boundary 7 is owned by boundaries 5 and 6 (i.e. shared)... You can describe this as well with an object diagram.

When I attempt to attach location C to either boundary 5 or 6 Then the attempt will not be successful. Obviously, trying to change the object associations like that would produce an object diagram that violates the relationships defined in the class diagram.

This what this (obviously school exercise) is about, drawing a class diagram that visualizes the relationships between classes and some object diagrams that visualize the associations between specific instances of these classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top