Пример #1
0
 public override void MakeDemand(PlaneMessage message)
 {
     if (message.Budget >= 3000)
     {
         Console.WriteLine("Model :" + message.Model + "Year:" + message.Year + "Airline :" + message.Airline + " " + "İnis takimi icin islem onaylandi\n");
     }
     else
     {
         Console.WriteLine("Model :" + message.Model + "Year:" + message.Year + "Airline :" + message.Airline + " " + "icin islem inis takimi maliyetinden ötürü mümkün olmadıgı icin onaylanmadı\n");
     }
 }
 public override void MakeDemand(PlaneMessage message)
 {
     if (message.Budget >= 15000)
     {
         Console.WriteLine("Model :" + message.Model + "Year:" + message.Year + "Airline :" + message.Airline + " " + "Kanat icin islem onaylandi\n");
         producer.MakeDemand(message);
     }
     else if (producer != null)
     {
         Console.WriteLine("Model :" + message.Model + "Year:" + message.Year + "Airline :" + message.Airline + " " + "icin islem kanat maliyetinden ötürü mümkün olmadıgı icin onaylanmadı\n");
         producer.MakeDemand(message);
     }
 }
Пример #3
0
        public static void Main(string[] args)
        {
            Producer engineProducer = new EngineConcrete();
            Producer gearProducer   = new GearConcrete();
            Producer wingProducer   = new WingConcrete();

            engineProducer.BuildChain(wingProducer);
            wingProducer.BuildChain(gearProducer);

            PlaneMessage planeMessage = new PlaneMessage("Boeing 737", "2015", "Türk Hava Yollar", 8000);

            engineProducer.MakeDemand(planeMessage);

            planeMessage = new PlaneMessage("Boeing 737", "2017", "Türk Hava Yollar", 1000);
            engineProducer.MakeDemand(planeMessage);

            planeMessage = new PlaneMessage("Boeing 737", "2018", "Türk Hava Yollar", 50000);
            engineProducer.MakeDemand(planeMessage);

            planeMessage = new PlaneMessage("Boeing 737", "2019", "Türk Hava Yollar", 20000);
            engineProducer.MakeDemand(planeMessage);
        }
Пример #4
0
 public abstract void MakeDemand(PlaneMessage message);