//=================================================================================================
public class FastCar extends Car {
//-------------------------------------------------------------------------------------------------
    private int maxSpeed;
//-------------------------------------------------------------------------------------------------
    public FastCar() {

        super();
        maxSpeed = 0;
    }
//-------------------------------------------------------------------------------------------------
    public FastCar(String makeAndModel,double purchasePrice, double salePrice,int maxSpeed) {

        super(makeAndModel,purchasePrice,salePrice);
        this.maxSpeed = maxSpeed;
    }
//-------------------------------------------------------------------------------------------------
    public String toString() {

        return(super.toString() + String.format(" (max speed %dmph)",maxSpeed));
    }
//-------------------------------------------------------------------------------------------------
    public String getMakeAndModel() {

        return(makeAndModel);
    }
//-------------------------------------------------------------------------------------------------
    public double getMaxSpeed() {

        return(maxSpeed);
    }
//-------------------------------------------------------------------------------------------------
}
//=================================================================================================
