Esempio n. 1
0
 //Constructor for IPhone4S
 static GSM()
 {
     iPhone4S         = new GSM("IPhone4S", "Apple");
     iPhone4S.price   = 5000;
     iPhone4S.owner   = "KoiCho";
     iPhone4S.battery = new Battery(BatteryType.NiCd, "Chinese first class", 5, 2);
     iPhone4S.display = new Display(4, 2);
 }
Esempio n. 2
0
        public static void Test()
        {
            GSM gsm1 = new GSM("G2", "LG", "Rado", 700m,
                               new Battery("LG1", 40, 250, BatteryType.NiCd),
                               new Display(5, 16000));

            GSM gsm2 = new GSM("One", "HTX", "Pesho", 750m,
                               new Battery("HTC1", 50, 350, BatteryType.Other),
                               new Display(6, 17000));

            GSM[] gsmArr = new GSM[] { gsm1, gsm2, GSM.IPhone4S };

            foreach (GSM gsm in gsmArr)
            {
                Console.WriteLine(gsm);
                Console.WriteLine();
            }
        }
Esempio n. 3
0
 public void TestHistory()
 {
     gsmDevice = new GSM("LG G2", "LG");
 }