Click here to Skip to main content
15,914,404 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: Message on user ingerface! Pin
Pete O'Hanlon14-Sep-07 0:15
mvePete O'Hanlon14-Sep-07 0:15 
QuestionMass mail sender app Pin
firestoper12-Sep-07 19:20
firestoper12-Sep-07 19:20 
AnswerRe: Mass mail sender app Pin
led mike13-Sep-07 4:44
led mike13-Sep-07 4:44 
QuestionThe "EGG" task Pin
Saikek12-Sep-07 11:16
Saikek12-Sep-07 11:16 
AnswerRe: The "EGG" task Pin
Pete O'Hanlon13-Sep-07 10:26
mvePete O'Hanlon13-Sep-07 10:26 
QuestionTechnologies for multiple-question application form. Pin
walkeraj11-Sep-07 8:24
walkeraj11-Sep-07 8:24 
AnswerRe: Technologies for multiple-question application form. Pin
ncushing26-Sep-07 20:16
ncushing26-Sep-07 20:16 
QuestionBasic Class Design Pin
rb15710-Sep-07 0:42
rb15710-Sep-07 0:42 
I am just trying to learn OOAD using c# at present, by designing a simple song management system.

Within this system there are songs which have one to many artists. I therefore designed classes as follows:


<br />
class Song<br />
{<br />
  Artist[] artists; <br />
  // various other attributes<br />
}<br />
<br />
class Artist<br />
{<br />
   String name;<br />
   //various other attributes<br />
}<br />
<br />
class SongList<br />
{<br />
  List<Song> songs;<br />
}<br />
<br />


This seems to work OK I could in my output list each 'Song in songs' and show the artist by looping through each one in that song.

Where I have got really confused is another requirement which I might have to list all Artists along with their songs. How can I build a collection of artists and list the songs for each artist if artist is an attribute of a song. I can after all do song.artist, but I cannot access song from the artist: artist.song.

On thinking further I decided that an artist is not actually an attribute of song, but just a loose relationship. If they are just to seperate objects in a collection how do I implement this loose relationship between the two objects.

Any help, including references to books or other material which may be of help would be greatly appreciated. I son't think that I am thinking correctly to understand this, so any help that will assist me in thinking the right way would be greatly appreciated.

Thanks,
Richard
AnswerRe: Basic Class Design Pin
Ed.Poore10-Sep-07 0:54
Ed.Poore10-Sep-07 0:54 
AnswerRe: Basic Class Design Pin
led mike10-Sep-07 5:09
led mike10-Sep-07 5:09 
GeneralRe: Basic Class Design Pin
rb15710-Sep-07 6:28
rb15710-Sep-07 6:28 
GeneralRe: Basic Class Design Pin
led mike10-Sep-07 8:02
led mike10-Sep-07 8:02 
QuestionRe: Basic Class Design Pin
rb15711-Sep-07 0:32
rb15711-Sep-07 0:32 
AnswerRe: Basic Class Design Pin
Maximilien10-Sep-07 7:00
Maximilien10-Sep-07 7:00 
GeneralRe: Basic Class Design Pin
rb15711-Sep-07 0:44
rb15711-Sep-07 0:44 
AnswerRe: Basic Class Design Pin
etkid8421-Sep-07 2:57
etkid8421-Sep-07 2:57 
AnswerRe: Basic Class Design Pin
Edward Steward21-Sep-07 19:37
Edward Steward21-Sep-07 19:37 
GeneralRe: Basic Class Design Pin
rb15721-Sep-07 23:37
rb15721-Sep-07 23:37 
GeneralRe: Basic Class Design Pin
Edward Steward22-Sep-07 15:11
Edward Steward22-Sep-07 15:11 
QuestionLoading Composite Object Model Pin
nzaveri5-Sep-07 6:46
nzaveri5-Sep-07 6:46 
AnswerRe: Loading Composite Object Model Pin
led mike5-Sep-07 7:46
led mike5-Sep-07 7:46 
GeneralRe: Loading Composite Object Model Pin
Magnus Salgo1-Oct-07 21:08
Magnus Salgo1-Oct-07 21:08 
QuestionHelp on Design for Cross-Platform Application Pin
brdavid4-Sep-07 3:57
brdavid4-Sep-07 3:57 
AnswerRe: Help on Design for Cross-Platform Application Pin
led mike4-Sep-07 6:51
led mike4-Sep-07 6:51 
GeneralRe: Help on Design for Cross-Platform Application Pin
brdavid4-Sep-07 11:24
brdavid4-Sep-07 11:24 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.