static void Main() { // Static IPhone4S TEST Console.WriteLine(GSM.IPhone4S); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); // GSM TEST var gsmTest = new GSMTest(); foreach (var gsm in gsmTest.ListOFGSMs) { Console.WriteLine(gsm); } Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); // CALL History TEST GSMCallHistoryTest.CallHistoryTest(); }
private static void Main() { // Inserting data: GSM myPhone = new GSM("Nokia", "Nokia OOD"); myPhone.Price = 500; myPhone.Owner = "Ivancho"; myPhone.battery = new Battery(BatteryType.NiMH); myPhone.battery.HourIdle = 12; myPhone.battery.HoursTalk = 520; myPhone.display = new Display(12); myPhone.display.NumberOfColors = 326; // Transfering data and printing Console.WriteLine(myPhone.PrintMobileInfo(myPhone.battery, myPhone.display)); // Iphone4S data: string theIPhoneInfo = GSM.IPhone4S; Console.WriteLine(theIPhoneInfo); // and ETC GSM phone = new GSM("Alcatel", "Alacatelov"); GSMTest.CreateAFewGSMs(5); // Adding calls myPhone.resentCall = new Call("0898123231"); Console.WriteLine(myPhone.resentCall.LastNumber); myPhone.CallHistory.Add(myPhone.resentCall); // Adding a second call myPhone.resentCall = new Call("08788765426"); // Adding the call to the list myPhone.CallHistory.Add(myPhone.resentCall); foreach (Call talk in myPhone.CallHistory) { Console.WriteLine(talk.LastNumber); } // From here on, the adding to the callHistory is automatic myPhone.AddAndRemove("add", myPhone); myPhone.AddAndRemove("remove", myPhone); double totalPrice = myPhone.TotalPriceOfCalls(myPhone); // Not working because I don't have thread.sleep or something to make timespan Console.WriteLine("Total price: {0}", totalPrice); // Clearing the history myPhone.ClearHistory(); GSMCallHistoryTest.GSMTest(); }
public static void Test() { GSM[] phone = new GSM[] { new GSM("Samsung", "Galaxy S5"), new GSM("Samsung", "Galaxy S4"), new GSM("Samsung", "Galaxy S3"), new GSM("Apple", "IPhone 6S") }; GSMTest test = new GSMTest(phone); Console.WriteLine(GSMTest.PrintInfo()); Console.WriteLine(GSM.IPhone4S); }
public static void Test() { GSM[] phone = new GSM[] { new GSM ("Samsung", "Galaxy S5"), new GSM ("Samsung", "Galaxy S4"), new GSM ("Samsung", "Galaxy S3"), new GSM ("Apple", "IPhone 6S") }; GSMTest test = new GSMTest(phone); Console.WriteLine(GSMTest.PrintInfo()); Console.WriteLine(GSM.IPhone4S); }
static void Main() { Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture; Battery myBattery = new Battery("Bateria"); Display myDisplay = new Display(); GSM myGSM = new GSM("Nokia","Nokia", 100.23M, "Pesho",myBattery,myDisplay); string myGSMinfo = myGSM.ToString(); Console.WriteLine(myGSMinfo); GSM mySecondGSM = GSM.IPhone4S; Console.WriteLine(mySecondGSM); GSMTest test = new GSMTest(); test.Create4GSMs(); GSMCallHistoryTest secondTest = new GSMCallHistoryTest(); secondTest.CallHistoryTest(); }
static void Main() { GSMTest.GSM_Test(); GSMCallHistoryTest.CallHistoryTest(); }
static void Main() { GSMTest.Test(); Console.WriteLine(); GSMCallHistoryTest.Test(); }
public static void Main() { GSMTest.Test(); GSMCallHistoryTest.Test(); }