Reputation: 8684
I have struct chartManager which contains struct of series and struct series which contain struct of points. and they are all in Chart class. something like this
Class Chart
{
protected:
struct points
{
int seriesPoints[10];
};
struct series
{
points seriespoints;
char seriesName[20];
};
struct pageManager
{
char chartName[20];
series totalSeries[5];
};
};
How do i show this in class diagram??
Upvotes: 1
Views: 4303
Reputation: 586
I see this is a old post, but maybe I can help someone with my answer.
The best way to describe the above example is with "Nesting" connections.
Composition or Aggregation prerequisite that they are independent and not within the class itself.
Upvotes: 2
Reputation: 133
A good answer is : never go from specific language to UML :)
Nevertheless, composition/aggregation with cardinality is for me the way to go (a struct is pretty the same as a class).
Upvotes: 2