Practice · 3 of 3
The library that drives its songs
CHALLENGE
Difficulty: advanced+25 XP
Implement Song (as before: five-play like rule with isLiked()) and Library: starts empty, add(Song) appends, playAll() plays every held song once, likedCount() returns how many held songs are currently liked. The Library must NOT duplicate play counts — it asks its songs.
Press Submit to check your solution.
Back to lesson: Practice: Class design gauntlet