Results 1 to 10 of 10
- 03-21-2012, 04:24 PM #1
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Association Classes for these classes
Can anyone help me to answer this question
Add association classes to the three many-to-many associations in the following diagrams. Show attributes that might be found in these association classes
i) Player ---------- SportsGame
ii) Spectator --------- Show
iii) Guest --------- Hotel Room
Thanks for any help given
- 03-21-2012, 04:27 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Association Classes for these classes
What do you think the answers are?
Unless you were expecting someone to do your homework for you.Please do not ask for code as refusal often offends.
- 03-21-2012, 04:32 PM #3
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Re: Association Classes for these classes
well this is what i came up with myself but i dont think they are the best solutions.
i) Registers[season,Title,…]
ii) Showing[Time, Date,…]
iii) Stay/Visit[StartDate, Duration]
- 03-21-2012, 04:35 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Association Classes for these classes
How are those associating the left hand side with the right hand side?
Please do not ask for code as refusal often offends.
- 03-21-2012, 04:39 PM #5
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Re: Association Classes for these classes
im not sure. im new to all this. that is why i am posting here. to get some help.
- 03-21-2012, 04:50 PM #6
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Re: Association Classes for these classes
can anyone help me out? :(
- 03-21-2012, 04:56 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Association Classes for these classes
Taking the first one.
You have a Player.
That Player can play in many Games.
In addition each Game can have many Players.
That's your many-to-many association.
The association class in between is a mapping between a single Player and a single Game.
So it needs attributes that allow it to identify which Player and which Game.Please do not ask for code as refusal often offends.
- 03-21-2012, 05:00 PM #8
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Re: Association Classes for these classes
Ok so i could call this class Plays
with attributes like playerName and nameOfGame?
would this be ok?
- 03-21-2012, 05:15 PM #9
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Association Classes for these classes
That looks about right to me.
Please do not ask for code as refusal often offends.
- 03-21-2012, 05:22 PM #10
Member
- Join Date
- Nov 2011
- Posts
- 13
- Rep Power
- 0
Similar Threads
-
Classes Help!!! two classes with object question.
By stuckonjava in forum New To JavaReplies: 16Last Post: 02-10-2012, 01:39 AM -
Use classes inside of other classes
By BlankFile in forum New To JavaReplies: 2Last Post: 02-06-2012, 01:51 PM -
Three classes help!!
By arrech326 in forum New To JavaReplies: 4Last Post: 11-24-2009, 06:34 AM -
Help with classes
By gnarly hogie in forum New To JavaReplies: 14Last Post: 10-10-2008, 02:29 PM -
Cant run my classes
By Assaf A in forum EclipseReplies: 1Last Post: 04-22-2008, 02:31 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks