Define a class named Car
.
The Car
constructor should accept a String
make, String
model, and Int
mileage, in that order.
Override equals
and consider two Car
instances to be equal if they have the same make and model.
Do not expose your Car
fields publicly.
You're challenge is to write tests for this problem described above.
Stuck? You may find these lessons helpful: