Question: In this project you will implement MyTunes, an improved version of your MP3 File Music Collection, developed already in the google drive. The improvements include

In this project you will implement MyTunes, an improved version of your MP3 File Music Collection, developed already in the google drive. The improvements include the addition of a Graphical User Interface (GUI), which enables convenient access to the songs in your collection, sorting and searching the songs by author, title, etc., and playing the songs. As before, your program should be able to play MP3 files and display some of the embedded tags in an MP3 file, such as title, author, album, and data, but all within a GUI interface. New features include sorting and searching of your MP3 files by any of the tags.

1.Modify your implementation of the MP3File class to assign any undefined MP3 tags of author, title, and album to (a string with just one space). Assign an undefined date of an MP3 file to the year 1900. Also, add the following methods (you should add a suitable instance variable): public int getYear() public void setYear(int year)

2. Implement a class called MP3Collection, which may be based on your MyMP3Files class developed in the previous project. This time, the new class should represent your collection of MP3Files using Javas LinkedList class. However, you must use only the List interface to refer to the list in MP3Collection. Provide the following methods in MP3Collection: MP3Collection() Create an empty collection. MP3Collection(String directoryPathname) Create a collection containing files in the specified directory. The collection should include only files with the .mp3 extension.

Object[][] getTableData()

Return the data from the List of MP3 files as a 2-dimensional array, where each

row represents one MP3 file and 4 columns represent the author, title, album,

and year (as a number) of an MP3 file. The number of rows should be equal to

the number of MP3 files in the List holding the MP3 files. int size()

Return the size of the collection.

MP3File getFile(int index) throws IndexOutOfBoundsException

Return an MP3File at the given index position in the collection. Throw an

IndexOutOfBoundsException exception if the index value is out of bounds. void startPlay(int index) throws IndexOutOfBoundsException

Start playing a file (MP3 song) at a given index position. Throw an IndexOutOfBoundsException exception if the index value is out of bounds.

void stopPlay()

Stop the currently playing file (song).

4. Create a Graphical User Interface (GUI) program, called MyTunes, serving as a manager of your collection. The MyTunes program should be implemented using a JFrame with suitable buttons, text fields and other components, as needed. IMPORTANT: you must use a JTable component to handle the songs in your MP3 collection. The JTable component should be initialized with the data obtained from the getTableData method in the MP3Collection class. The columns in the JTable should be labeled Author, Title, Album, and Year. The MyTunes program should provide the following GUI capabilities:

View the MP3 files; scrolling up/down, if only a portion of the files fits within the JTable view should also be possible. You should create a JScrollPane for the JTable. The usual functionality of a JTable, such as resizing and repositioning of the columns should be available, as well.

Sort any of the four columns (author, title, etc.) by clicking on the column header; repeated clicks on the same column should reverse the sorting order. You should create a TableRowSorter for the JTable.

Filter the shown MP3 files by providing a substring (it should be present in any of the columns). The string to be used in filtering should be entered into a JTextBox, and then pressing the Enter key should activate the filter. You should create a RowFilter.regexFilter (using a static method) for the sorter used in the JTable.

Cancel an existing filter by pressing a suitable button.

Play the selected MP3 file (the selection should be within the JTable showing the MP3 files). Pressing the Play button should first invoke the stopPlay() method (in case a song is currently playing when the user selects a different song to play) and then invoke the startPlay() method of the MP3Collection. A MP3Player class is available on the drive

Stop the playback of an MP3 file by pressing a suitable button. Pressing the Stop button should invoke the stopPlay method of the MP3Collection.

Closing the MyTunes window (JFrame) should terminate the program. You may add a Quit button, if you like. The three buttons (i.e., Play, Stop, and Cancel) and the text box used for filtering should be located at the top of the frame (window), and the JTable should occupy the whole lower part of the JFrame. You should use the Box layout (layout manager). The MyTunes program should either accept a directory with the MP3 files as a command line argument, or, if not provided, use the directory called Music in the users home directory (use the user.home property and the System class). It must not prompt the user for a music directory

https://drive.google.com/open?id=1O4alEKMFvCf0lhbutDSMyFxiwOVtFWYH

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!