Interface Car


public interface Car

Write a description of interface Car here.

Version:
(a version number or a date)
Author:
(your name)

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

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

refuel

void refuel(int fuelAmount)
Refuels the car

Parameters:
fuelLoad - the amount of fuel to be refueled

run

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

Parameters:
distance - distance to be ran

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