/home/caleb/ASDV-Java/Semester 2/Assignments/Exam2-Practice2_CalebFontenot/src/main/java/com/calebfontenot/exam2/practice2_calebfontenot/Vehicle.java |
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt
nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java
package com.calebfontenot.exam2.practice2_calebfontenot;
import java.util.Objects;
@author
abstract public class Vehicle implements Cloneable, Comparable<Vehicle> {
private String vin;
public Vehicle(){}
public Vehicle(String vin) {this.vin = vin;}
public String getVin() { return vin; }
public void setVin(String vin) { this.vin = vin; }
@Override
public String toString()
{ return "Vehicle{" + "vin=" + vin + '}'; }
@Override
public boolean equals(Object obj)
{
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final Vehicle other = (Vehicle) obj;
return Objects.equals(this.vin, other.vin);
}
}