static void Main() { //create array of gsm object and display info + info iphone4s GSM[] gsmArray = new GSM[3] { new GSM("Asha 1", "Nokia", owner: "Peter"), new GSM("One", "HTC", new Battery(Battery.BatteryType.LiPoly, "superBat"), new Display(6, 2640000), price: 999.90), new GSM("Xperia", "Sony") }; foreach (var gsm in gsmArray) { Console.WriteLine(gsm); Console.WriteLine(); } Console.WriteLine(GSM.IPhone4s); //test the call methods and history Console.BackgroundColor = ConsoleColor.DarkRed; Console.WriteLine("---------STARTING CALL TEST-------"); Console.ResetColor(); GSMCallHistoryTest.CallHistoryTest(); }
static void Main() { GSM[] arrayOfPhones = new GSM[3]; Battery nokiaBattery = new Battery("BL-5K", BatteryType.LiIon, 20, 5); Display nokiaDisplay = new Display("320x240", 4096); GSM nokiaN86 = new GSM("N86 8MP", "NOKIA", 150.4m, "Lora", nokiaBattery, nokiaDisplay); Battery samsungBattery = new Battery("2100 mAh", BatteryType.LiIon, 25, 6); Display samsungDisplay = new Display("720 x 1280", 16000000); GSM samsungS3 = new GSM("Galaxy S3", "Samsung", 900.45m, "Nora", samsungBattery, samsungDisplay); Battery lgBattery = new Battery("1500 mAh", BatteryType.LiIon, 3, 2); Display lgDisplay = new Display("480x800", 65535); GSM LGOptimus = new GSM("Optimus 3D", "LG", 778.2m, "Dora", lgBattery, lgDisplay); arrayOfPhones[0] = nokiaN86; arrayOfPhones[1] = samsungS3; arrayOfPhones[2] = LGOptimus; foreach (var phone in arrayOfPhones) { Console.WriteLine(phone); } // Test the static field IPhone4S Console.WriteLine(GSM.IPhone4S.Manufacturer); Console.WriteLine(GSM.IPhone4S.Model); Console.WriteLine(GSM.IPhone4S.Price); Console.WriteLine(); // Test Call History GSMCallHistoryTest callHistoryTest = new GSMCallHistoryTest(samsungS3); callHistoryTest.CallHistoryTest(); }
static void Main() { GSMTest.TestDevice(); GSMCallHistoryTest.CallHistoryTest(); }