Define a public class named Song
.
The Song
constructor should accept a String
name, String
artist, and int year, in that order.
Reject null
names and artists using assert
.
Override equals and consider two Song
instances to be equal if they have the same name, artist, and year.
Do not expose your Song
fields publicly.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: