Interface Car

All Known Implementing Classes:
Lory, PersonalCar

public interface Car

Write a description of interface Car here.


Method Summary
 int load(int cargo)
          Loads the amount of a cargo/persons
 void refuel(int fuelAmount)
          Refuels the car
 void run(int distance)
          Runs the distance suplied as a parameter
 int unload(int cargo)
          Unloads the amount of cargo/persons, if available, else fully unloads the car.
 

Method Detail

run

void run(int distance)
Runs the distance suplied as a parameter

Parameters:
distance - distance to be ran

refuel

void refuel(int fuelAmount)
Refuels the car

Parameters:
fuelLoad - the amount of fuel to be refueled

load

int load(int cargo)
Loads the amount of a cargo/persons

Parameters:
cargo - amount of a cargo/persons
Returns:
amount of really loaded cargo/persons

unload

int unload(int cargo)
Unloads the amount of cargo/persons, if available, else fully unloads the car.

Parameters:
cargo - amount of a cargo/persons
Returns:
amount of unloaded cargo/persons