Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Could you explain...

 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am confused with the following paragraph of Applying UML and Patterns, Craig Larman,Section 10.7.1,Page 111


In the UML, the multiplicity value is context dependent.Rumbaugh[Rumbaugh91] gives an excellent example on Person and Company in the Works-for association.Indicating if a Person instance works for one or many Company instances is dependent on the context of the model; the tax department is interested in many; a union probably only one



I have absolutely no clue of what "context dependency" is all about.What is Larman hinting to?
It would be great if somebody could explore the paragraph indepth?
Regards,

------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
the context is the subject matter surronding which the relationship exists, like in person-company relationship the context is persons working in a acompany. person in company, students enrolled for courses, students assigned to teachers are contexts and on that the multiplicity depends.
i think u have been thinking too much on it.
just take it easy.
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Avijeet,
Thanks for the response.You are right - probably I am thinking too much!!
Going by what you have mentioned


Indicating if a Person instance works for one or many Company
instances is dependent on the context of the model;


The above quote represents a context of a person working in one or many company
But what does the following quote mean?


the tax department is interested in many; a union probably
only one


Thanks once again for your response.
Regards,


------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The key to the statement is:
"the tax department is interested in many; a union probably only one"
A tax department falls within one context and a union another.
In other words, If a tax department is interested in many, then in that context (situation), you should model many.
If a union is interested in one, then in that context (situation), you should model one.
------------------
David Roberts - SCJP2,MCP
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,
Normally when we talk about multiplicity, we talk in terms of relationship between 2 concepts.So if A has to have an association with B, it would be either the context of A or B which would decide the multiplicity.
How would you say which context should dictate the multiplicity?For example, in the following quote:


the tax department is interested in many; a union probably only one


If an association is between tax department and company concepts,there could be 2 cases

  1. tax department might be interested in many companies, but company interested in only one tax department
  2. tax department interested in one company, but companies interested in many tax departments.

  3. So in the above case, what would be context, and how would you model the multiplicity?
    The only solution that I could think of is what Larman has suggested in Section 10.9, i.e. having Multiple Association between two types.
    Please advise
    Regards,
    Sandeep Desai
    vgdesai@bom3.vsnl.net.in

    1. Sun Certified Java Programmer Scored 93 per cent
    2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
    3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
    4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

    5. [This message has been edited by Desai Sandeep (edited April 24, 2001).]
 
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you have many tax departments for many companies (perhaps you are modeling for H&R Block) then Multiple association sounds like it might be the solution. But...
Getting back to the original problem, suppose a person works in the tax department. This person will look at a big company and could actually see many companies. There are different tax regulations for different things: perhaps sales, income and property taxes. For each tax, you might consider it working for a different company, thus a person works for many companies.
If you were a union head, you would only see one company. In this case a person works for only one company. Some company different results. This is my take on the different contexts, HTH.
Paul R
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,
My apologies for the delay in reply.I was out of town.
As you have suggested, a person could work for only company or for many companies depending on his profile.In such a suitation, do we consider having 3 concepts - Person, UnionHead, Company?Or we model it with only 2 concepts - Person and Company?
TIA.
Regards,


------------------
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56
 
Ranch Hand
Posts: 233
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe that the point Larman tries to make is the following:
The tax department *cares* whether a person works-for >1 company
(a bunch of taxing-related issues are dependent on that piece of info); on the other hand the workers' union of company C does not care if person P also has a part time job with company C' at the same time. If person P works-for their company, then it is a member of their union, and they couldn't care less if it works for 10 other companies in its free time. So, it's just that the workers' union for simplicity does not model the real world in the more complete way that the tax department needs.
So, the morale of the story is: Model real-world as completely as you need, but not more...
Do you agree/disagree with this view/interpretation of mine?
Panagiotis.
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Panagiotis,
Appreciate your views!!
Infact, you have made me to think in a different direction.Till now, I was under the impression that the context revolves around concepts of the problem domain.
From you explanation, I infer that the context is the problem domain itself.If that is correct, it means, that the multiplicity and association would be determined by the context of the problem which we are trying to solve or develop - Only the need-to-know association needs to be specified, as Larman mentions in his book!!!
In the above case, we had identified the TaxDepartment and the Person (and probably Person and Company) as important concepts.So the association and mutiplicity would be dictated by them.The relationship between Union and Person or Union and Company may be ignored in the present problem domain concept.
Hope I got it correct??
Regards,
Sandeep Desai
vgdesai@bom3.vsnl.net.in

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

  5. [This message has been edited by Desai Sandeep (edited May 04, 2001).]
 
David Roberts
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was out of town as well.
For these two items you've already stated the context exactly as they should be.


1. tax department might be interested in many companies, but company interested in only one tax department
2. tax department interested in one company, but companies interested in many tax departments.


It's not about what we think tax authorities care about specifically, it's about the real world problem domain as I think you've stated.
So, the context to which he was referring is basically, what does the customer care about?
------------------
David Roberts - SCJP2,MCP
 
Paul Ralph
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wasn't out of town, but I guess I was out to lunch. I think Panagiotis and David said it much better than I could have.
Paul R
 
Desai Sandeep
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Thanks a lot for the response.
So let me restate what I have learnt -- The multiplicity is decided by the problem domain context AND NOT by the context of the concepts.
If I got the above statement wrong, please post back.However, I would like someone to say that I am beginning to think in the right direction .
-- Sandeep

[This message has been edited by Desai Sandeep (edited May 09, 2001).]
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic