I have an interface that requires my vehicles to have a engine power and break power. My abstract class of boat has a
Code:
static final brake
but every type of boat(sub-classes) has its own engine power. My abstract car class leaves it up to the subclasses how much brake power they have. Is the boat abstract class wrong
heres so code to help clear it up
PHP Code:
[code]
interface 
IVehicule{
    
double EnginePower null;
    
double BreakPower null;
    
double Decelerate(double speedint geardouble brake);
    
double Accelerate(int geardouble EnginePower);
    
int IncGear();
    
int DecGear();
}


abstract class 
Boats implements IVehicule
{    
    private static final 
double Brake 5;
    protected 
double speed;
    protected 
int gear;
    public 
double Decelerate (double speedint geardouble brake)
    {
        return 
this.speed=speed/brake+(gear/2);
    }

    public 
int DecGear ()
    {
        return 
this.gear--;
    }
    public 
int IncGear ()
    {
        return 
this.gear++;
    }
    public 
double Accelerate (int geardouble EnginePower)
    {        
        return 
gear*EnginePower;
    }    
}

class 
SpeedBoat extends Boats implements IVehicule{    
    public static 
double EnginePower 20.0;                    
    public 
void decelerate(double speed,int gear,double brake){
        
Decelerate(speedgearbrake);
    }
    public 
void accelerate(int gear){
        
Accelerate(gearEnginePower);
    }
    public 
void incgear(){
        
IncGear();
    }
    public 
void decgear(){
        
DecGear();
    }
    
}
/*      does this class need to 
**      implement its own field 
**      decleration for brake or 
**      is it fine in the abstract class? */
[/code