I have to describe the structure of the system of dining philosophers using a uml component diagram in a client server architectural style.
I did this:开发者_如何学Go
but i have many doubts on its correctness:
is it correct to show every philosopher or should i draw only a generic one? and what about the forks?
should the forks be included in the table/server component?
There are two things you might be trying to show.
Components in general: Philosopher, Fork, Dining Room.
Component Instances. Philosopher 0-4, Fork 0-4 and the Dining Room.
The general component diagram doesn't show instances, but shows interfaces, and might include some constraints on the relationships to show that there are 5 instances exactly.
The instance diagram would look similar to what you've shown with 5 instances of the Philosopher component, and 5 instances of the Fork component, and 1 instance of the Dining Room component.
http://argouml-stats.tigris.org/documentation/manual-0.26/ch23s05.html
精彩评论