package Model; public class Motorcycle implements IVehicle{ private String _brand; private String _color; public Motorcycle(String brand, String color) { this._brand = brand; this._color = color; } public String getBrand() { return this._brand; } public void setBrand(String brand) throws IllegalArgumentException { if (brand == null || brand.length() < 3) { throw new IllegalArgumentException("Brand must be at least 3 characters long"); } this._brand = brand; } public String getColor() { return this._color; } public void setColor(String color) throws IllegalArgumentException { if (color == null || color.length() < 3) { throw new IllegalArgumentException("Color must be at least 3 characters long"); } this._color = color; } @Override public String toString() { return "Motorcycle{" + "brand='" + _brand + '\'' + ", color='" + _color + '\'' + '}'; } }