Suppose you are writing software for a radio station that manages its playlists.
ID: 3732249 • Letter: S
Question
Suppose you are writing software for a radio station that manages its playlists. The program will generate candidate playlists from a record library automatically and station personnel can then check and modify them. Disc jockeys must also be able to change playlists when they are used because what is actually played is often different from what is planned. The playlists are then used to generate reports for paying royalties. You must decide what sort of data structure to use to store playlists. Make a choice and write a design rationale. Your rationale should explain the factors that went into your decision, the design alternatives you considered, your evaluation of design decisions, and the reasoning for your final choice.
Explanation / Answer
Solution:
Methods:
create palyList(list songs)
delete song(playlist playlistName, song songName)
addSong(playList playListName, song songName)
playSong(playList playListName, song songName)
classes:
class playList
{
string name;
list<songs> songList;
boolean played;
int no_of_played;
}
class song
{
string name;
int length; //this is in seconds
string gere, type;
}
Data Sturctures:
The Map data structure will be more suitable hre.
map<playList, list, songs>
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.