import com.seanhandley.projects.BinaryTree.IStrategy; /** * * Strategy object for a car. * * Converts weight from kg to lb. * * @author Sean Handley, 320097@swan.ac.uk * @version May 2007 */ public class CarStrategy2 implements IStrategy<Car> { /** * Carry out operation on car. */ public void compute(Car car) { //convert kg to lb car.weight = car.weight * 0.45359237; } }