Results 1 to 2 of 2
  1. #1
    TripVoltage is offline Member
    Join Date
    Nov 2013
    Posts
    1
    Rep Power
    0

    Default 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

    MP3 catalogue with favorites (ArrayList)-capture.png

    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.

    (Or)

    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 10:34 PM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,305
    Rep Power
    25

    Default Re: MP3 catalogue with favorites (ArrayList)

    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Replies: 12
    Last Post: 07-07-2011, 08:49 PM
  2. Favorites
    By alone882 in forum JavaFX
    Replies: 2
    Last Post: 01-27-2011, 04:14 PM
  3. Replies: 7
    Last Post: 11-22-2010, 01:26 PM
  4. Replies: 2
    Last Post: 04-21-2008, 11:43 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •