Song{
int Songid;
String name;
Artist Artist;
Album album;
void play();
}
Album{
int albumid;
String name;
Artist albumArtist;
ArrayList<Song> songs;
ArrayList<Song> getSongs();
}
Artist{
int arId;
String name;
ArrayList<Album> albums;
ArrayList<Song> songs;
ArrayList<Album> getAlbums();
ArrayList<Song> getSongs();
}
I am confident about the int and String members of every class. But does the Object type members show redundancy ? I want every method to work as fast as possible .
I will require to show name of album of around 10,000 songs. and on certain events will require to get songs of a particular album.
So I have though that when Song.album is assigned, album.songs.add(song) will also be done automatically.