Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- Represents an automobile.
- */
- public class Auto extends Vehicle
- {
- private String licensePlate;
- public Auto(String vin, String plate)
- {
- super(vin);
- licensePlate = plate;
- }
- public boolean equals(Object _a)
- {
- Auto a = (Auto)_a;
- return licensePlate.equals(a.licensePlate) && super.equals(a);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement