Skip to content

Instantly share code, notes, and snippets.

@cocomatt
cocomatt / music-library-oop.js
Created February 27, 2018 21:58
Music Library as OOP exercise
'use strict'
/*
A Library has a name and a creator (both strings)
These are the only things required in order to create a music library
A Library has many playlists (starts as an empty array)
Playlist objects can be added to an instance of a library
Each Playlist has a name which is required upon creation
A Playlist also has many tracks
A Track has a title, a rating (an integer from 1 to 5) and a length (integer in seconds) all of which are required when creating a new track