When createing car, make a choice between imperial and metric units
metric - km, litres, l/100km
imperial - miles, galons, mile per gallon
Use strategy pattern?
To avoid problems with l/100km - miles/gallon always compute consumption in both ways - show user l/100km and also km/l - than only string change is required (no other computations)
When createing car, make a choice between imperial and metric units
metric - km, litres, l/100km
imperial - miles, galons, mile per gallon
Use strategy pattern?
To avoid problems with l/100km - miles/gallon always compute consumption in both ways - show user l/100km and also km/l - than only string change is required (no other computations)