Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            //S:Single Responsibility Principle

            //Problem
            var car = new Transport(1, "Audi");

            car.InsertTransport(car);
            //Decision
            var carDecision = new DecisionTransport(1, "Audi");
            var result      = new FunctionsTransport();

            result.InsertTransport(carDecision);
            result.ViewTransport();
            //O:Open-Closed Principle


            Console.ReadKey();
        }
 public void InsertTransport(DecisionTransport transport)
 {
     decTransports.Add(transport);
 }