Define a public class named Car
.
The Car
constructor should accept a String
make, String
model, and int
mileage, in that order.
Reject null
makes and models using assert
.
Override equals and consider two Car
instances to be equal if they have the same make and model.
Do not provide getters or setters for your variables or expose them publicly.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: