

class Vehicle implements Comparable<Vehicle> {

	private String vin;
	private int towCapacity = 0;

	public Vehicle(String vin, int towCapacity) {
		this.vin = vin;
		this.towCapacity = towCapacity;
	}

	@Override
	public String toString() {
		return "" + towCapacity;
	}

	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof Vehicle)) {
			return false;
		}

		Vehicle other = (Vehicle) obj;

		return (this.vin.equals(other.vin));
	}

	public int compareTo(Vehicle other) {
		return this.towCapacity - other.towCapacity;
	}
}
