Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program: SongList and MySong For this project, you will be creating a lists of songs, like a playlists in a music app. The song data

Program: SongList and MySong For this project, you will be creating a lists of songs, like a playlists in a music app. The song data will be obtained from an online dataset and accessed via the BRIDGES API. The dataset structure for the songs consists of the title, release_date, artist, album, and lyrics.

You are to write a class called MySong to hold information about songs.

The MySong class must implement the Comparable

You will be obtaining the song data to create MySong objects using the BRIDGES API via the connect.DataSource and bridges.data_src_dependent.Song classes.

You will store the MySong objects in a second class called SongList

The SongList class implements the custom List Download Listinterface and the java.lang.Iterable interface.

You only need to implement the iterator method of the Iterable interface, you may leave the two default methods as they are provided.

A SongIterator class must be implemented as an inner class to the SongList

Each SongList must have a name and a linked chain of SLelement<MySong> objects

In addition to implementing the interfaces in MySong and SongList as previously described, the program is to:

Include a main method that will read song data from the BRIDGES song dataset.

Create an instance of the SongList class of SLElement objects (http://bridgesuncc.github.io/doc/java-api/current/html/classbridges_1_1base_1_1_s_lelement.htmlLinks to an external site.) and populate the linked list with MySong objects created from the dataset.

Provide method that returns a formatted list of all the songs by an artist that appear on the linked list (name given as a String parameter to the method), in alphabetical order according to song title. The name of the method must be:

public String getSongsByArtist(String artist)

The returned String is to be formatted with each song on a separate line with the song title and album labeled as shown here:

Title: Harder, Better, Faster, Stronger Album: Discovery

If no songs by the given artist are on the playlist, the following message is to be displayed, There are no songs by Tai Verdes in this playlist. (substituting the relevant artists name for Tai Verdes).

It is expected that your program will be well documented and must contain a comment block at the beginning that includes the following information in an easy-to-read format: the file name, your name, the project number, the course identifier (CMSC 256), and the current semester, and a brief description of the files purpose.

Implement both files inside of a cmsc256 package. Submit the individual Java source code files to the Project 3 link in Gradescope. Do not compress the files, they should be submitted as a single submission of individual files.

package cmsc256; public interface List { /** * Remove all contents from the list, so it is once again empty */ public void clear(); /** * Inserts element at the given position * @param it * @param position * @return true if successful * @throws IllegalArgumentException if position is < 0 or > number of elements in the list */ public boolean insert(E it, int position); // /** * Appends element to the end of the list * @param it * @return true if successful */ public boolean add(E it); /** * @param position * @return Remove and return the element at position * @throws IllegalArgumentException if position is < 0 or > number of elements in the list */ public E remove(int position); /** * @return the number of elements in this list */ public int size(); /** * @return true if this list has no elements */ public boolean isEmpty(); /** * @param target

* @return true if the target element is in this list * false otherwise */ public boolean contains(E target); /** * @return the element at the given position * @throws IllegalArgumentException if position is < 0 or > number of elements in the list */ public E getValue(int position);

}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Seven Databases In Seven Weeks A Guide To Modern Databases And The NoSQL Movement

Authors: Luc Perkins, Eric Redmond, Jim Wilson

2nd Edition

1680502530, 978-1680502534

Students also viewed these Databases questions

Question

Differentiate between hard and soft measures of service quality.

Answered: 1 week ago

Question

Be familiar with the different perspectives of service quality.

Answered: 1 week ago

Question

Describe key customer feedback collection tools.

Answered: 1 week ago