Results 1 to 2 of 2
- 11-03-2013, 04:21 PM #1Member
- Join Date
- Nov 2013
- Rep Power
MP3 catalogue with favorites (ArrayList)
It has all the usual functions EG add track, delete track, swap tracks and sort track by name, title, aritst etc. All communication is via the console window.
I have a main, MP3Track, MP3Interface and several comparator classes. Main calls static methods such as addTrack, searchCat, moveTrack and trackExists etc. MP3Track contains data members such as trackNo, trackName, artist, album & length. My collection is stored in an ArrayList.
MoveTrack swaps two track numbers if they exist.
I would like to add a favorites function.
Typical output below FYI
I was thinking that one possible option would be to add an extra data member in MP3Track (boolean inFav) flagging if this in or isn't. Then iterating through the collection and extracting favorites for manipulation etc.
To have another collection (what type of?) for favorites pointing to the original. One of the problems I can see with this is if a user adds a track number to favorites and then later swaps track numbers in the main collection my favorites will now contain a track I didn't choose to be there!! (I think). I want them to be able to add a track either by tack number or title. Am I right and if so how could I overcome this. Or maybe I've got this all wrong...M
...all suggestions, improvements, pointers and advice much appreciated.
Thanks in advance for any help.
Last edited by TripVoltage; 11-03-2013 at 11:34 PM.
- 11-03-2013, 04:39 PM #2
Re: MP3 catalogue with favorites (ArrayList)
Also posted at: MP3 catalogue with favorites (ArrayList)If you don't understand my response, don't ignore it, ask a question.
- By ralf in forum New To JavaReplies: 12Last Post: 07-07-2011, 09:49 PM
- By alone882 in forum JavaFXReplies: 2Last Post: 01-27-2011, 05:14 PM
- By alok_sharma in forum Java ServletReplies: 7Last Post: 11-22-2010, 02:26 PM
- By BC2210 in forum New To JavaReplies: 2Last Post: 04-21-2008, 12:43 PM