Menu

(Solved) : Paython Code Listening Music Always Great Way De Stress Nowadays Music Stored Digital Form Q36117957 . . .

paython code:

Listening to music has always been a great way to de-stress.Nowadays, music is stored in digital format and playlists arecreated based on how people want to group the songs. Each song hasa title and the artist (or band). An artist has an album which iscollection of their songs. A playlist is created by combiningindividual songs or albums of the artist. You are required to drawthe UML class diagram and create the classes, related attributesand methods to represent this scenario. Given below is the testcase for the classes you have to create, ensure that your programworks for the given test case.

# Test Cases

# Create artist and their songs newband = Artist(“A&H”)newband.add_song(Song(“Beginning”,newband))newband.add_song(Song(“Turn”,newband))newband.add_song(Song(“Light”,newband))newband.add_song(Song(“Forever”,newband))newband.add_song(Song(“New Life”,newband))newband.add_song(Song(“Supernatural”,newband))newband.add_song(Song(“Miracles”,newband)) # Show all songs of theartist newband.showAllSongs() # Create artist and two songs band2 =Artist(“Race”) song1 = Song(“Fast”, band2) song2 = Song(“FinishLine”, band2)

# Create playlist playlist1 = Playlist(“My Favorite Songs”) #Add all artist songs to playlistplaylist1.add_artSongs(newband.getArtSongs()) # Add one song toplaylist playlist1.add_song(song2) # Show all songs in playlistplaylist1.showPlistSongs()

Expert Answer


Answer to Paython Code Listening Music Always Great Way De Stress Nowadays Music Stored Digital Form Q36117957 . . .

OR