# Unit 2 – Basic Demo: Song and Artist

Every song has an artist behind it. In this demo you create artist 
objects and song objects and connect them — each song knows which 
artist performed it, so you can play it, see how many times it has 
been listened to, and dedicate it to someone.

## Setting up

1. Compile `Artist` and `Song`.
2. Create an artist: `Artist("Adele", "pop")`.
3. Create a song, passing the artist from the Object Bench: 
   `Song("Hello", adele)`.

## Experimenting

4. Call `play()` three times and watch the terminal output.
5. Call `describe()` — the play count has changed, and the genre text 
   came from the `Artist` object, not from `Song` itself.
6. Call `dedicate("your name")` — the artist's name appears in the result.
7. Create a second song with the same artist: 
   `Song("Rolling in the Deep", adele)`.
8. Call `play()` on each song a different number of times, then call 
   `describe()` on both — play counts differ, but both show Adele's name 
   and genre, coming from the same single `Artist` object.

## What to look at in the code

9. Open `Song`. The constructor parameter `artist: Artist` declares that 
   every `Song` holds a reference to a real `Artist` — not just a name 
   string.
10. In `describe()`, the call `artist.credit()` reaches into the `Artist` 
    object and runs its method. The song delegates the formatting work 
    instead of duplicating it.
11. Inspect a `Song` on the Object Bench — `artist` is shown as a 
    reference to the `Artist` object, not a copy of its data.
12. Try creating a `Song` without passing an artist — BlueJ will not 
    allow it. The type `Artist` (without `?`) means this slot can never 
    be empty.
