Skip to main content

Practice · 4 of 5

Implement from a spec (FRQ 2 style)

CHALLENGE
Difficulty: beginner+25 XP

Read the comment spec in the boilerplate and implement Song exactly: constructor stores both fields; duration() formats M:SS; isLongerThan compares stored seconds (strictly greater). Do not add public members.

Back to lesson: Practice: Design reps