Challenge A: Bike protocols

Implement Comparable and Hashable on the Bike class. Create a Set of bikes of various wheel numbers and sizes, then sort them by their wheel size.

Note: You may simply use wheelSize to calculate hashValue. If you’d like, add another property of your choice to Bike that can make it even more unique.

results matching ""

    No results matching ""