1 25 26 package org.objectweb.speedo.pobjects.detach; 27 28 31 public abstract class Vehicle { 32 33 public static final String CAR = "car"; 34 public static final String FORMULAONE = "formulaOne"; 35 public static final String BOAT = "boat"; 36 public static final String VEHICLE = "vehicle"; 37 38 private String name; 39 private String type; 40 41 public Vehicle(String name){ 42 this.name = name; 43 this.type = VEHICLE; 44 } 45 46 public Vehicle(){ 47 this.name = ""; 48 this.type = VEHICLE; 49 } 50 51 public String getName() { 52 return name; 53 } 54 55 public void setName(String string) { 56 name = string; 57 } 58 59 public String getType() { 60 return type; 61 } 62 63 public void setType(String string) { 64 type = string; 65 } 66 67 public String toString(){ 68 return "Vehicle[" + name + ", " + type +"]"; 69 } 70 71 72 } 73 | Popular Tags |