Exemplo n.º 1
0
 public GSM(string model, string manufacturer, decimal? price=null, Person owner=null, Battery battery=null, Display display=null)
     : this(model,manufacturer)
 {
     this.Price = price;
     this.Owner = owner;
     this.Battery = battery;
     this.Display = display;
 }
Exemplo n.º 2
0
        static void Main()
        {
            Person pesho = new Person("Pesho");

            Display display = new Display(5.4, 16000);

            Battery battery = new Battery("5KR76", 6.4, 4.1, BatteryType.NiCd);

            GSM gsm = new GSM("C30", "Nokia", 45.46m, pesho, battery, display);
            //GSM gsm = new GSM("C30", "Nokia", owner: pesho, display: display);

            Console.WriteLine(gsm.ToString());
            Console.WriteLine(GSM.IPhone4S.ToString());
        }