# Unit 4 – Basic Demo: Playlist

A playlist is a personal collection of songs for any occasion — road 
trips, workouts, late nights. You build it up one track at a time, 
star-rate your favourites, and remove anything that no longer fits the 
mood.

## Setting up

1. Compile `Playlist`.
2. Create a `Playlist("Road Trip")` object on the Object Bench.

## Experimenting

3. Call `addTrack("Mr Brightside")`, `addTrack("Bohemian Rhapsody")`, 
   and `addTrack("Waterloo")`.
4. Call `printAll()` — all three appear numbered and marked `"not rated"`.
5. Call `rate("Mr Brightside", 5)` and `rate("Waterloo", 3)`.
6. Call `printAll()` again — two tracks now show their score; 
   `"Bohemian Rhapsody"` is still unrated.
7. Call `hasTrack("Mr Brightside")` — returns `true`.
8. Call `hasTrack("Stairway to Heaven")` — returns `false`.
9. Call `trackCount()` — returns `3`.
10. Call `removeTrack("Waterloo")`, then `printAll()` — only two tracks 
    remain.
11. Remove the remaining tracks and call `printAll()` — you should see 
    the empty-list message.

## What to look at in the code

12. `tracks` is a `MutableList` — it keeps songs in insertion order and 
    allows `add` and `remove`.
13. `ratings` is a `MutableMap` — each track title is a key that maps to 
    a star score. A key can be added, updated, or removed at any time.
14. `removeTrack()` removes the title from both collections so the two 
    stay in sync.
15. `printAll()` checks `tracks.isEmpty()` before deciding what to 
    print, and uses a `for` loop with a counter variable to produce 
    numbered output.
