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.
- Provide a Song class that has a title and a singer as data members.
- Create a doubly linked list, with a head node (musicPlaylist) pointing to the first song on the list.
- Display a menu for the user to choose an option, as follows:
- Add a song
- Delete a song
- Play a song
- Skip forward
- Skip backward
- 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
Get step-by-step solutions from verified subject matter experts
