Question: Exercise 2: You are to code some simple music player application making appropriate use of doubly linked lists, as described hereafter. Create a doubly linked

Exercise 2:

You are to code some simple music player application making appropriate use of doubly linked lists, as described hereafter.

Create a doubly linked list for a music playlist.

  1. Provide a Song class that has a title and a singer as data members.
  2. Create a doubly linked list, with a head node (musicPlaylist) pointing to the first song on the list.
  3. Display a menu for the user to choose an option, as follows:
    1. Add a song
    2. Delete a song
    3. Play a song
    4. Skip forward
    5. Skip backward
    6. Exit

Adding and deleting songs (#1-2) should update the playlist accordingly. Adding a song places it at the end of the list.

Playing a song (#3) will prompt the user to enter the title of the song and print both the title and singer (e.g., Now playing by )

Skipping forward or backward (#4-5) will jump to the previous song or the next song, respectively, and display its title and singer (as per above). Skip forward on the last song takes you to the beginning of the list. Skip backward on the first song takes you to the last song of the list.

Exit will quit the program.

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!