/** This is a driver class Automobiles which is inherited to Engine and Transmission * Class. * http://www.fordvehicles.com/cars/fusion/features/specs/ * * @author Freeman Lo * @version 0.0.1 Build 1 Jan 28, 2014. * */ public class Automobile { private Engine engine; private Transmission transmission; private int horsePower; private int torque; private String compressionRatio; private String fuelEconomy; private String fuelRecommended; public Automobile(Engine engine, Transmission transmission, int horsepower, int torque, String compressionRatio, String fuelEconomy, String fuelRecommended) { this.engine = engine; this.transmission = transmission; this.horsePower = horsepower; this.torque = torque; this.compressionRatio = compressionRatio; this.fuelEconomy = fuelEconomy; this.fuelRecommended = fuelRecommended; } public Engine getEngine() { return engine; } public Transmission getTransmission() { return transmission; } public int getHorsepower() { return horsePower; } public int getTorque() { return torque; } public String getCompressionRatio() { return compressionRatio; } public String getFuelRecommended() { return fuelRecommended; } public String getFuelEconomy() { return fuelEconomy; } public String toString() { return "Automobile{" + "engine=" + engine + ", transmission=" + transmission + ", horsepower=" + horsePower + ", torque=" + torque + ", compressionRatio=" + compressionRatio + ", fuelRecommended='" + fuelRecommended + '\'' + ", fuelEconomy='" + fuelEconomy + '\'' + '}'; } }