Advertisement
advictoriam

Untitled

Mar 5th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. /**
  2.    Represents an automobile.
  3. */
  4.  
  5. public class Auto extends Vehicle
  6. {
  7.    private String licensePlate;
  8.    
  9.    public Auto(String vin, String plate)
  10.    {
  11.       super(vin);
  12.       licensePlate = plate;
  13.    }
  14.  
  15.    public boolean equals(Object _a)
  16.    {
  17.       Auto a = (Auto)_a;
  18.       return licensePlate.equals(a.licensePlate) && super.equals(a);
  19.    }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement