Advertisement
advictoriam

Untitled

Mar 4th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.32 KB | None | 0 0
  1. /**
  2.    Represents an automobile.
  3. */
  4. public class Auto extends Vehicle
  5. {
  6.    String plate;
  7.    
  8.    public Auto(String _vin, String _plate)
  9.    {
  10.       super(_vin);
  11.       plate = _plate;
  12.    }
  13.  
  14.    @Override
  15.    public String getID()
  16.    {
  17.       return String.format("VIN=%s,plate=%s", super.getID(), plate);
  18.    }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement