

class Vehicle {
    /* Fields: data that is stored for each instance of the class
        Made private so can only be modified within this class definition */

	private String VIN = null;

    /* Constructor: Same name as class, used to take in data and initialize fields */

	public Vehicle(String v) {
		this.VIN = v;
	}

    /* Setter method: a method used to control modifications to a field */

	public void setVIN(String v) {
		this.VIN = v;
	}

    /* Getter method: a method used to retrieve the value of a field */

	public String getVIN() {
		return VIN;
	}

    /* Redefine the Object class' toString method */

	@Override
	public String toString() {
		return VIN;
	}

    /* Redefine the Object class' equals method */

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

		Vehicle that = (Vehicle) obj;

		return this.VIN.equals(that.VIN);
	}
}
