Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Semantics of Association and Aggregation/Composition(Semantics)
icon1.gif  Semantics of Association and Aggregation/Composition [message #517759] Mon, 01 March 2010 23:09 Go to next message
amir  is currently offline amir Friend
Messages: 4
Registered: March 2010
Junior Member
Hi All

My question is very trivial and at the same time very technical.

Suppose, we have a system, where there are 5 Universities. Each university is composed (Composition) of 10 departments. And each department has 20 faculty members (Composition) and 10 courses (Composition). Also, we have an association of "teaching" between faculty members and courses. Now the question is, 1) Considering the type of aggregation is composition and faculty members and courses strictly belong to one and only one department, Does this mean that faculties must teach courses strictly offered by the same department or they could take courses from other departments without conceptually belonging to/ working for them? Wouldn't make sense if we had shared aggregations instead of compositions in case of the relationship between department and faculty, making it possible for one faculty to work in other departments and then taking courses offered by other departments? 2) taking the original design using compositions, Is it possible to have one faculty to take courses from other universities, without conceptually working for it? Note that this hierarchical composition could be extended. 3) how is it going to be implemented code generation-wise, considering one particular department owns instances of faculty and courses, and at the same time handling the association between their instances?

This is just an example, so don't restrict yourself to this example.

With Regards
Re: Semantics of Association and Aggregation/Composition [message #517765 is a reply to message #517759] Mon, 01 March 2010 23:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26221
Registered: July 2009
Senior Member
Amir,

Comments below.

amir wrote:
> Hi All
>
> My question is very trivial and at the same time very technical.
>
> Suppose, we have a system, where there are 5 Universities. Each
> university is composed (Composition) of 10 departments. And each
> department has 20 faculty members (Composition) and 10 courses
> (Composition). Also, we have an association of "teaching" between
> faculty members and courses. Now the question is, 1) Considering the
> type of aggregation is composition and faculty members and courses
> strictly belong to one and only one department, Does this mean that
> faculties must teach courses strictly offered by the same department
> or they could take
You mean teach?
> courses from other departments without conceptually belonging to/
> working for them?
Given you said teaching is an (arbitrary) association, any faculty
member could teach any course regardless of the department that contains
the faculty member or the course.
> Wouldn't make sense if we had shared aggregations instead of
> compositions in case of the relationship between department and
> faculty, making it possible for one faculty to work in other
> departments and then taking courses offered by other departments?
You again mention "taking courses," but you've not defined that concept.
Only the concept of teaching. The concept of "work in" has also not
been defined.
> 2) taking the original design using compositions, Is it possible to
> have one faculty to take courses from other universities, without
> conceptually working for it?
Taking and working for are not defined yet.
> Note that this hierarchical composition could be extended. 3) how is
> it going to be implemented code generation-wise, considering one
> particular department owns instances of faculty and courses, and at
> the same time handling the association between their instances?
You're question is way too vague.
>
> This is just an example, so don't restrict yourself to this example.
Where are you going with this line of reasoning and questioning?
>
> With Regards
Re: Semantics of Association and Aggregation/Composition [message #517784 is a reply to message #517765] Tue, 02 March 2010 05:55 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 161
Registered: July 2009
Senior Member
Ed Merks wrote on Mon, 01 March 2010 18:22

Where are you going with this line of reasoning and questioning?



Can't help but think he is just trying to get someone to do his homework for him for free...
Re: Semantics of Association and Aggregation/Composition [message #517851 is a reply to message #517765] Tue, 02 March 2010 10:51 Go to previous messageGo to next message
amir  is currently offline amir Friend
Messages: 4
Registered: March 2010
Junior Member
What I'm trying to say is if we had a class structure like that, what would the multiplicity constraints be on the association defined between the classes Faculty and Course? AND the association is mandatory and it makes sense considering each faculty has to teach at least one course and each course has to be taught by at least one faculty member.

Let me rephrase my question. If we had a mandatory association defined between two classes that have a common composite class somewhere in the class structure, should the multiplicity constraints be defined with respect to the common composite class, or the maximum and minimum multiplicity number is defined based on the overall number of existing objects of the classes at that level.

As in our example, there are 5X10X20 instances of faculty members created (they could belong to different departments or universities) and 5X10X10 instances of courses created, so Now the question is should the maximum multiplicity possible defined over the association be 1000 and 500, where one faculty could teach as many as 500 courses and one course be taught by 1000 faculty members. I know this does not make sense, but the question is, is this combination possible from semantic point of view.

btw, by taking courses, I meant teaching. And working is the relationship between department and faculty and offering is the relationship between dept and courses.

And this has got nothing to my H/W, dude, I'm just trying to figure out how to go about writing a reasoner for UML class diagram.

cheers
Re: Semantics of Association and Aggregation/Composition [message #517867 is a reply to message #517851] Tue, 02 March 2010 11:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26221
Registered: July 2009
Senior Member
Amir,

Comments below.


amir wrote:
> What I'm trying to say is if we had a class structure like that, what
> would the multiplicity constraints be on the association defined
> between the classes Faculty and Course?
Multiplicity constraints are exactly as you specify them. They don't
depend on class structure.
> AND the association is mandatory and it makes sense considering each
> faculty has to teach at least one course and each course has to be
> taught by at least one faculty member.
At my university, not all faculty members taught courses in any given
semester, but certainly every course had an instructor.
>
> Let me rephrase my question. If we had a mandatory association defined
> between two classes
You're meaning a lower bound of > 0...
> that have a common composite class somewhere in the class structure
This is way too vague.
> , should the multiplicity constraints be defined with respect to the
> common composite class, or the maximum and minimum multiplicity number
> is defined based on the overall number of existing objects of the
> classes at that level.
It should be based on the number of instances that validly can or must
appear in the property.
>
> As in our example, there are 5X10X20 instances of faculty members
> created (they could belong to different departments or universities)
> and 5X10X10 instances of courses created, so Now the question is
> should the maximum multiplicity possible defined over the association
> be 1000 and 500, where one faculty could teach as many as 500 courses
> and one course be taught by 1000 faculty members.
You don't put constraints based on the maximum number of instances that
can exist in the universe. You put constraints in place based on what
reality you're modeling. You might require all faculty members to teach
at least one course all the time. You most certainly would expect each
course to have at least one instructor. You might want to put upper
limits on the number of courses a faculty member can teach, so they
don't die from too much work. You might also limit the number of
instructors that can teach a given course, so the room doesn't overfill
with instructors leaving no space for actual students. But in both
cases, such upper limits are a bit arbitrary.
> I know this does not make sense, but the question is, is this
> combination possible from semantic point of view.
>
> btw, by taking courses, I meant teaching. And working is the
> relationship between department and faculty and offering is the
> relationship between dept and courses.
>
> And this has got nothing to my H/W, dude, I'm just trying to figure
> out how to go about writing a reasoner for UML class diagram.
>
> cheers
Re: Semantics of Association and Aggregation/Composition [message #517892 is a reply to message #517867] Tue, 02 March 2010 13:18 Go to previous messageGo to next message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
............................................................ ............

[Updated on: Wed, 10 March 2010 13:59]

Report message to a moderator

Re: Semantics of Association and Aggregation/Composition [message #628281 is a reply to message #517765] Tue, 02 March 2010 05:55 Go to previous messageGo to next message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 161
Registered: July 2009
Senior Member
Ed Merks wrote on Mon, 01 March 2010 18:22
> Where are you going with this line of reasoning and questioning?


Can't help but think he is just trying to get someone to do his homework for him for free...
Re: Semantics of Association and Aggregation/Composition [message #628282 is a reply to message #517765] Tue, 02 March 2010 10:51 Go to previous messageGo to next message
amir  is currently offline amir Friend
Messages: 4
Registered: March 2010
Junior Member
What I'm trying to say is if we had a class structure like that, what would the multiplicity constraints be on the association defined between the classes Faculty and Course? AND the association is mandatory and it makes sense considering each faculty has to teach at least one course and each course has to be taught by at least one faculty member.

Let me rephrase my question. If we had a mandatory association defined between two classes that have a common composite class somewhere in the class structure, should the multiplicity constraints be defined with respect to the common composite class, or the maximum and minimum multiplicity number is defined based on the overall number of existing objects of the classes at that level.

As in our example, there are 5X10X20 instances of faculty members created (they could belong to different departments or universities) and 5X10X10 instances of courses created, so Now the question is should the maximum multiplicity possible defined over the association be 1000 and 500, where one faculty could teach as many as 500 courses and one course be taught by 1000 faculty members. I know this does not make sense, but the question is, is this combination possible from semantic point of view.

btw, by taking courses, I meant teaching. And working is the relationship between department and faculty and offering is the relationship between dept and courses.

And this has got nothing to my H/W, dude, I'm just trying to figure out how to go about writing a reasoner for UML class diagram.

cheers
Re: Semantics of Association and Aggregation/Composition [message #628283 is a reply to message #628282] Tue, 02 March 2010 11:43 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 26221
Registered: July 2009
Senior Member
Amir,

Comments below.


amir wrote:
> What I'm trying to say is if we had a class structure like that, what
> would the multiplicity constraints be on the association defined
> between the classes Faculty and Course?
Multiplicity constraints are exactly as you specify them. They don't
depend on class structure.
> AND the association is mandatory and it makes sense considering each
> faculty has to teach at least one course and each course has to be
> taught by at least one faculty member.
At my university, not all faculty members taught courses in any given
semester, but certainly every course had an instructor.
>
> Let me rephrase my question. If we had a mandatory association defined
> between two classes
You're meaning a lower bound of > 0...
> that have a common composite class somewhere in the class structure
This is way too vague.
> , should the multiplicity constraints be defined with respect to the
> common composite class, or the maximum and minimum multiplicity number
> is defined based on the overall number of existing objects of the
> classes at that level.
It should be based on the number of instances that validly can or must
appear in the property.
>
> As in our example, there are 5X10X20 instances of faculty members
> created (they could belong to different departments or universities)
> and 5X10X10 instances of courses created, so Now the question is
> should the maximum multiplicity possible defined over the association
> be 1000 and 500, where one faculty could teach as many as 500 courses
> and one course be taught by 1000 faculty members.
You don't put constraints based on the maximum number of instances that
can exist in the universe. You put constraints in place based on what
reality you're modeling. You might require all faculty members to teach
at least one course all the time. You most certainly would expect each
course to have at least one instructor. You might want to put upper
limits on the number of courses a faculty member can teach, so they
don't die from too much work. You might also limit the number of
instructors that can teach a given course, so the room doesn't overfill
with instructors leaving no space for actual students. But in both
cases, such upper limits are a bit arbitrary.
> I know this does not make sense, but the question is, is this
> combination possible from semantic point of view.
>
> btw, by taking courses, I meant teaching. And working is the
> relationship between department and faculty and offering is the
> relationship between dept and courses.
>
> And this has got nothing to my H/W, dude, I'm just trying to figure
> out how to go about writing a reasoner for UML class diagram.
>
> cheers
Re: Semantics of Association and Aggregation/Composition [message #628284 is a reply to message #517867] Tue, 02 March 2010 13:18 Go to previous message
Vlad Varnica is currently offline Vlad VarnicaFriend
Messages: 546
Registered: July 2009
Location: Milton Keynes - UK
Senior Member
Just use directly the UML2 metamodel and do as you want when you want in the way you want . :d
This is really simple and a lot more powerful.

Once the modeling stage is finished you click on the .uml model > Validate and you will immediately see if the model is respecting validation rules or not.
Good luck for your project !!
Previous Topic:Semantics of Association and Aggregation/Composition
Next Topic:Extending the Standard profile
Goto Forum:
  


Current Time: Tue Nov 25 21:21:45 GMT 2014

Powered by FUDForum. Page generated in 0.04156 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software