Example #1
0
 public Manual(Type type, int seats, Engine engine, Transmission transmission, TripComputer tripComputer, GPSNavigator gpsNavigator)
 {
     this.type         = type;
     this.seats        = seats;
     this.engine       = engine;
     this.transmission = transmission;
     this.tripComputer = tripComputer;
     this.gpsNavigator = gpsNavigator;
 }
        static void Main()
        {
            helper.SetupConsole();

            var tripComp = new TripComputer();

            tripComp.FuelEconomy = new StandardEconomy();
            helper.PrintColorText("Loaded Standard Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);

            tripComp.FuelEconomy = new FuelSaveEconomy();
            helper.PrintColorText("Loaded FuelSave Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);

            tripComp.FuelEconomy = new AggressiveEconomy();
            helper.PrintColorText("Loaded Aggressive Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);
        }
        static void Main()
        {
            helper.SetupConsole();

            var tripComp = new TripComputer();

            tripComp.FuelEconomy = new StandardEconomy();
            helper.PrintColorText("Loaded Standard Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);

            tripComp.FuelEconomy = new FuelSaveEconomy();
            helper.PrintColorText("Loaded FuelSave Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);

            tripComp.FuelEconomy = new AggressiveEconomy();
            helper.PrintColorText("Loaded Aggressive Economy\n\n", ConsoleColor.DarkBlue);
            tripComp.FuelEconomy.CalculateRoute();
            PrintFuelEconomy(tripComp.FuelEconomy);
        }
Example #4
0
 public void SetTripComputer(TripComputer tripComputer)
 {
     this.tripComputer = tripComputer;
 }