Sale!

CMSC256 Programming Assignment 3 solution

Original price was: $30.00.Current price is: $25.00.

Category:

Description

Rate this product

For this project, you will be searching and sorting song data. The song data will be obtained from an
online dataset and access via the BRIDGES API – https://bridgesdata.herokuapp.com/api/datasets/song.
The dataset structure for the songs consists of the title (as “song”), release_date, artist, album, and
lyrics.
{

“song”: “Happy”,
“release_date”: “2013-11-21”,
“artist”: “Pharrell Williams”,
“album”: “G I R L”,

“lyrics”: “\n\n[Produced by Pharrell Williams]\n\n[Verse 1]\nIt might seem crazy what I’m ’bout to say\nSu
nshine she’s here, you can take a break\nI’m a hot air balloon that could go to space\nWith the air, like I d
on’t care, baby, by the way\n\n[Hook]\n(Because I’m happy)\nClap along if you feel like a room without a r
oof\n(Because I’m happy)\nClap along if you feel like happiness is the truth\n

(Because I’m happy)\nClap a
long if you know what happiness is to you\n(Because I’m happy)\nClap along if you feel like that’s what yo
u wanna do\n\n[Verse 2]\nHere come bad news, talking this and that (Yeah!)\nWell, give me all you got, d
on’t hold it back (Yeah!)\nWell, I should probably warn ya, I’ll be just fine (Yeah!)\nNo offense to you, don’t
waste your time, here’s why…\n\n[Hook]\n(Because I’m happy)\

nClap along if you feel like a room without
a roof\n(Because I’m happy)\nClap along if you feel like happiness is the truth\n(Because I’m happy)\nCl
ap along if you know what happiness is to you\n(Because I’m happy)\nClap along if you feel like that’s wh
at you wanna do\n\n[Bridge]\nBring me down\nCan’t nothing bring me down\nMy level’s too high to bring
me down\nCan’t nothing bring me down, I said…

\nBring me down\nCan’t nothing bring me down\nMy leve
l’s too high to bring me down\nCan’t nothing bring me down, I said…\n\n[Hook]\n(Because I’m happy)\nCl
ap along if you feel like a room without a roof\n(Because I’m happy)\nClap along if you feel like happiness
is the truth\n(Because I’m happy)\nClap along if you know what happiness is to you\n(Because I’m happy
)\nClap along if you feel like that’s what you wanna do\n(Because I’m happy)\nClap along if you feel like a
room without a roof\n(Because I’m happy)\

nClap along if you feel like happiness is the truth\n(Because I’
m happy)\nClap along if you know what happiness is to you\n(Because I’m happy)\nClap along if you feel
like that’s what you wanna do\n\n[Bridge]\nBring me down\nCan’t nothing bring me down\nMy level’s too
high to bring me down\nCan’t nothing bring me down, I said…\

nBring me down\nCan’t nothing bring me d
own\nMy level’s too high to bring me down\nCan’t nothing bring me down, I said…\n\n[Hook]\n(Because I’
m happy)\nClap along if you feel like a room without a roof\n(Because I’m happy)\nClap along if you feel li
ke happiness is the truth\n(Because I’m happy)\nClap along if you know what happiness is to you\n(Beca
use I’m happy)\nClap along if you feel like that’s what you wanna do\

n(Because I’m happy)\nClap along if
you feel like a room without a roof\n(Because I’m happy)\nClap along if you feel like happiness is the truth
\n(Because I’m happy)\nClap along if you know what happiness is to you\n(Because I’m happy)\nClap alo
ng if you feel like that’s what you wanna do\n\n”
}

You are to obtain the song data and Song objects using the BRIDGES API via the
bridges.connect.DataSource and bridges.data_src_dependent.Song classes. To
provide customized sorting of the song data, you are to write a SongComparator class that implements
the java.util.Comparator interface for bridges.data_src_dependent.Song objects.
A second class is to be written called SongList that contains a main method.

The program is to:

• Read song data from the BRIDGES song dataset
• Read an artist name as a command line argument. If a command line argument is not provided,
prompt the user to enter an artist name.
• Provide method that returns a formatted list of all the songs by that artist that appear on the
playlist, grouped by album and in alphabetical order by 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,
artist and album labeled as shown here:
Title: Harder, Better, Faster, Stronger Artist: Daft Punk Album: Discovery

• If no songs by the given artist are on the playlist, an appropriate message is to be displayed.
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 file’s purpose.

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