Skip to content

Instantly share code, notes, and snippets.

@hfaerber
Created May 15, 2019 02:21
Show Gist options
  • Save hfaerber/bd2dcf5c19bdd6c746291a1d571d42bc to your computer and use it in GitHub Desktop.
Save hfaerber/bd2dcf5c19bdd6c746291a1d571d42bc to your computer and use it in GitHub Desktop.
Class: Playlist
Attributes:
SongAmount (integer)
PlayLength (float)
SongLength (hash)
PlaylistCreator (string)
PlaylistTitle (string)
SongPlays (hash)
Methods:
AverageSongLength (divides PlayLength by SongAmount)
AverageSongsPerHour (divides 60 by AverageSongLength)
AddSong (increases SongAmount, increases PlayLength, modifies SongLength)
RemoveSong (decreases SongAmount, decreases PlayLength, modifies SongLength)
ChangePlaylistTitle (modifies PlaylistTitle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment