kokobillsoft / BuildingMaket

0 stars 0 forks source link

Car factory #10

Open AlexisK opened 6 years ago

AlexisK commented 6 years ago

There is a factory that can create different cars. It can create Ferrari, Jeep and Vaz. Each type of car has a speed, maxFuel and consumption(rate of fuel depletion per 1 distance unit). Each car can .drive(distance) and will return time it takes to do so.

Create 1 Ferrari, 2 Jeep and 2 Vaz cars and make them drive few distances. Handle fuel amount, notify if car can't continue a trip.