Example #1
0
        public static void AddPassenger(PassengerCarrier thing)
        {
            //PassengerCarrier.loadPassenger();
            PassengerCarrier carrier = (PassengerCarrier)thing;

            carrier.loadPassenger();

            Console.WriteLine(thing.ToString());
        }
Example #2
0
        static void Main(string[] args)
        {
            PassengerCarrier myCarrier = SelectionCarrier.Select(typeOfTrip.beetwenCities, pricePrioriti.middle, timePrioriti.normally);

            if (myCarrier != null)
            {
                Console.WriteLine(myCarrier.Info());
                Console.WriteLine($"My carrier is {myCarrier.GetTitle()}");
            }
            Console.ReadKey();
        }