Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Add and remove songs from a Playlist.Retrieve a certain song in the list.Display the entire playlist.Shuffle the playlist.Display detailed information about any of the items
Add and remove songs from a Playlist.Retrieve a certain song in the list.Display the entire playlist.Shuffle the playlist.Display detailed information about any of the items song album, or playlistThink carefully about the relationship between Song and Album. Albums contain Songs, and Songs refer to their Albums. This means that, if a Song has an Album, you will need an Albumto put it in first.One way to handle this would be to allow users to create entire Albums with their Songs at a time.Problem decomposition will be your best friend here. After implementing your classes, make a flow chart or some other plan for how Main should operate before writing code. What menus will there be What happens after a menu option is selected? Etc. Dont throw all of your code inMain Write helper functions. Remember to make constructors! You will need to use theRandom library for shuffling. At this point in the class, it will be very difficult to retrieve a certain song using its title. For now, I would suggest retrieving a song by its index in the array or list you are using for the playlist.public override string ToString will help immensely to generate data to print to the console. This is a method you can override in Any class that allows you to return data about an object as a string. Class Descriptions GenreGenreis an Enumerated Type ENUM representing different musical genres. It should contain afixed set of values that represent various genres, such as "Rock," "Pop," "Hip Hop," etc.SongSongis a class representing a single song. It should have attributes such as title, artist, duration,andGenre and any other attributes as you see fit. Each song may also hold a reference to itsAlbum.SongListSongListis an abstract class that serves as a base class for organizing collections of songs. Itshould have a collection ofSongobjects as an attribute and provide methods to add, remove, andretrieve songs from the collection.SongListsshould also have a title.SongListalso tracks the total runtime of the list.Any time a song is added to the list, theruntime isautomaticallyincreased.Any time a song is removed from the list,the runtime isautomaticallydecreased.AlbumAlbumis a child class ofSongListwith additional attributes for the artist, band members, andrelease date of theAlbum and any other attributes that you see fit.PlaylistPlaylistis a child class ofSongListthat adds functionality.Playlistwill extend the base class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started