Question: Turn this into java code - Objectives Practice Queue and Exception handling Problem We are creating a queue of songs. Each song has a name

Turn this into java code-
Objectives
Practice Queue and Exception handling
Problem
We are creating a queue of songs. Each song has a name and a singer. Methods needed in the Queue
class of songs are the followings. The description and pseudocode for each method is given in the shell.
In each of the methods exception handling must be used. Codes without exception handling will not get
the credit.
Queue class
enqueue: place a song at the end of the queue
dequeue: take a song from the begging of the queue
play: plays all the songs in the queue
getSingersSongs: list all the songs of a particular singer
toString: list all the songs in the queue
restore: restore the queue to its original status
reverseOrder: reverse the order of the songs in the list
getPercentage: Get the percentage of the songs that belongs to a particular singer in the list
preserve: restore the queue in its original status
Song class
The code is given
Driver class
The code is given
YourDriver class
create a class similar to the given driver with minimum of 7 songs. Must test all the methods written in
the queue class.
Sample output
Refer to the provided fil

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 Programming Questions!