static void Main() { GSMTest.GSMTesting(); //7.2 Display the information about the GSMs in the array Console.WriteLine(GSM.Iphone4S); // 7.3 Display the information about the static property IPhone4S. GSMCallHistoryTest.TestHistoryFunctionality(); }
static void Main() { GSMTest.DevicesTest(); Console.WriteLine(new string ('-', 20)); GSMCallHistoryTest.TestCallHistory(); }
public static void Main() { //Problem 7. GSM test GSMTest.GSMTests(); //Problem 12. Call history test GSMCallHistoryTest.TestCallHistory(); }
static void Main() { // GSMTest -- Display info about 4 GSM-s. (Problem 7) GSMTest.DisplayGsmInfo(); // GSMCallHistoryTest Testing call history (Problem 12) GSMCallHistoryTest.TestPhone(); }
static void Main() { GSMTest firstTest = new GSMTest(); firstTest.TestingGSM(); GSMCallHistoryTest callHistory = new GSMCallHistoryTest(); callHistory.GSMCallHistoryTesting(); }
static void Main() { GSMTest gsmTest = new GSMTest(); GSMCallHistoryTest callHistoryTest = new GSMCallHistoryTest(); gsmTest.Test(); callHistoryTest.Test(); }
static void Main() { GSMTest test = new GSMTest(); test.Test(); GSMCallHistoryTest test2 = new GSMCallHistoryTest(); test2.CallHistoryTest(); }
public static void Main(string[] args) { var test = new GSMTest(); test.DisplayGSMInformation(); var callTest = new GSMCallHistoryTest(); callTest.CallTest(); }
public static void Main() { GSMTest.Init(); GSMTest.Check_Correct_ToString(); GSMTest.Check_Correct_IPhone4S_Info(); GSMCallHistoryTest.Init(); GSMCallHistoryTest.Display_Calls_Info(); GSMCallHistoryTest.Check_Correct_Calculate_Calls(); GSMCallHistoryTest.Check_Remove_Longest_And_Calculate_Calls(); GSMCallHistoryTest.Check_Clear_Call_History(); }
static void Main() { try { //adding battery type i the battery constructor Battery batteryOne = new Battery("SameModel", 10, 20, BatteryType.LiIon); Console.WriteLine("-------------------------EX3---------------------------"); Console.WriteLine(batteryOne.Type); // creating phone Display displayOne = new Display(55f); GSM gsm = new GSM("55k33", "Nokia", 666, "Nqkoi", batteryOne, displayOne); // test for override method ToString() Console.WriteLine("-------------------------EX4---------------------------"); Console.WriteLine(gsm.ToString()); Console.WriteLine("-------------------------EX.7--------------------------"); //creating object test GSMTests test = new GSMTests(); test.Tests();//call its method It is void method so it will directly write the data //ex.9 Console.WriteLine("------------------------EX9---------------------------"); string dateTime ="22.12.2013 01.05.35"; DateTime day = DateTime.ParseExact(dateTime, "dd.MM.yyyy HH.mm.ss", CultureInfo.InvariantCulture);//date string dateTime2 = "20.12.2013 01.05.35"; DateTime day2 = DateTime.ParseExact(dateTime2, "dd.MM.yyyy HH.mm.ss", CultureInfo.InvariantCulture);//date Call firstCall = new Call(day,"0555555555",78); Call secondCall = new Call(day2, "0555555555", 105); Console.WriteLine(firstCall.DateAndTime); gsm.AddCalls(firstCall); gsm.AddCalls(secondCall); Console.WriteLine(); Console.WriteLine(gsm.CallHistory[0].DateAndTime); Console.WriteLine(gsm.CallHistory[1].DateAndTime); Console.WriteLine("------------------------EX10--------------------------"); gsm.DeleteCall(secondCall); for (int i = 0; i < gsm.CallHistory.Count; i++) { Console.WriteLine(gsm.CallHistory[i].DateAndTime); } gsm.ClearCallHistory(); Console.WriteLine("There is {0} call in the call history",gsm.CallHistory.Count); Console.WriteLine("--------------------------EX12------------------------"); GSMCallHistoryTest testHistory = new GSMCallHistoryTest(); testHistory.GSMCallHistoryTests(); } catch (ArgumentException exep) { Console.WriteLine("There is incorrect data!"); Console.WriteLine(exep.ToString()); } }
static void Main() { GSM newMobile = new GSM("Gakaxy III", "Samsung", 900,"Peter"); //Console.WriteLine(newMobile.ToString()); GSMTest gsmArray = new GSMTest(); //foreach (var item in gsmArray.arrOfMobiles) //{ // Console.WriteLine(item); // Console.WriteLine(); //} GSMCallHistoryTest gsmCallHistory = new GSMCallHistoryTest(); gsmCallHistory.PhoneCalls(); }
static void Main() { GSM gsm = new GSM("Vanio", "Tanio"); GSMTest test = new GSMTest(); string[] models = { "Nokia", "Samsung", "Motorola" }; string[] manafacturer = { "China", "Belarus", "Russia" }; int[] prices = { 300, 500, 2000 }; string[] owner = { "Gosho", "Pesho", "Vasko" }; Console.Write(test.GsmTestInformation(models, manafacturer, prices, owner)); Console.WriteLine(GSM.IPhone4S); GSMCallHistoryTest phone = new GSMCallHistoryTest(); phone.AddTestCalls(gsm); gsm.PrintCalls(); Console.Write("The total price is: "); Console.WriteLine(gsm.CalculatePrice(0.37m)); phone.RemoveBiggestCall(gsm); Console.Write("The price after removing bigest talk: "); Console.WriteLine(gsm.CalculatePrice(0.37m)); gsm.ClearCalls(); }
static void Main() { //Task 7 Display info and test Battery batt = new Battery("Samsung", 8, 42, BatteryType.LiIon); GSM[] phones = new GSM[2]; phones[0] = new GSM("One", "HTC"); phones[1] = new GSM("Galaxy S3", "Samsung", 1000, "Svetlio", batt, new Display(4.8f, 16000000)); foreach (var tel in phones) { Console.WriteLine(tel); } Console.WriteLine(GSM.iPhone4S); //Task 12 GSMCallHistoryTest test = new GSMCallHistoryTest(); test.Test(); }
static void Main() { Console.WriteLine(new string('-', 50)); Console.WriteLine("Enter information for first phone: "); Console.WriteLine(new string('-', 50)); GSM[] array = new GSM[2]; Console.ForegroundColor = ConsoleColor.Red; GSM firstGSM = new GSM(); firstGSM.Read(); Console.ResetColor(); Console.WriteLine(); Console.WriteLine(new string('-', 50)); Console.WriteLine("Enter information for second phone: "); Console.WriteLine(new string('-', 50)); Console.ForegroundColor = ConsoleColor.Green; GSM secondGSM = new GSM(); secondGSM.Read(); Console.ResetColor(); EmptySpace(4); Console.WriteLine(new string('-', 50)); Console.WriteLine("Print information for first phone: "); Console.WriteLine(new string('-', 50)); Console.ForegroundColor = ConsoleColor.Red; firstGSM.Print(); Console.ResetColor(); EmptySpace(2); Console.WriteLine(new string('-', 50)); Console.WriteLine("Print information for second phone: "); Console.WriteLine(new string('-', 50)); Console.ForegroundColor = ConsoleColor.Green; secondGSM.Print(); Console.ResetColor(); EmptySpace(2); Console.WriteLine(new string('-', 50)); Console.WriteLine("Print information for IPhone4S: "); Console.WriteLine(new string('-', 50)); Console.ForegroundColor = ConsoleColor.Blue; GSM.IPhone4S.Print(); Console.ResetColor(); EmptySpace(4); GSMCallHistoryTest historyTest = new GSMCallHistoryTest(); historyTest.HistoryTest(); Console.WriteLine(); }
private static void Main() { GSMTest.Run(); GSMCallHistoryTest.Run(); }
static void Main() { GSMTest.RunTest(); GSMCallHistoryTest.RunTest(); }
static void Main() { GSMCallHistoryTest.CallHistoryTest(); }
static void Main() { GSMTest.ShowGSMInfo(); GSMCallHistoryTest.testCallHistory(); }
static void Main() { GSMTest.Test(); GSMCallHistoryTest.TestCallHistory(); }
static void Main(string[] args) { GSM myGSM = new GSM("3310", "Nokia"); //model and manafacturers are mandatory GSMTest test = new GSMTest(); //entering type of battery myGSM.Battery.Type = BatteryType.LiIon; myGSM.Owner = "Kiril Petrov"; //fake name :) myGSM.Price = 345.21m; myGSM.Battery.Idle = 6.5; //hours in idle mode of type double myGSM.Battery.Talk = 1.5; //hours in talk mode of type double myGSM.Display.Size = 7.4; //size in inches myGSM.Display.Colors = 16.5; //colors in millions //myGSM.Print(); //print GSM properties //myGSM.Battery.Print(); //print Battery properties //myGSM.Display.Print(); //print Display properties //06. print static field iPhone 4s Console.WriteLine(GSM.IPhone4s.ToString()); //07.GSMTest //07.01.Create Array of GSM instances test.Create(); //07.02. Display the information about the GSMs in the array test.Print(); //07.03 Display the information about the static property IPhone4S. test.PrintStatic(); //08.Call class myGSM.Call = new Call(DateTime.Now, "++359 887 231 123", 32); //09.Call add list myGSM.CallHistory.Add(myGSM.Call); myGSM.Call = new Call(DateTime.Now, "++44 772 123 94", 98); myGSM.CallHistory.Add(myGSM.Call); myGSM.Call = new Call(DateTime.Now.AddDays(1), "++887 231 123", 32); myGSM.CallHistory.Add(myGSM.Call); myGSM.Call = new Call(DateTime.Now.AddDays(2), "++359 111 2222", 47); myGSM.CallHistory.Add(myGSM.Call); myGSM.Call = new Call(DateTime.Now.AddDays(3), "++1 273 1230", 77); myGSM.CallHistory.Add(myGSM.Call); //09 Display the call History myGSM.CallHistory.DisplayHistory(); //10.Call remove Console.WriteLine("We will remove the call on position 1"); myGSM.CallHistory.RemoveAt(1); //we remove calls by index number because in the real world is like that myGSM.CallHistory.DisplayHistory(); //11.Calculate Bill myGSM.CallHistory.CalculateBill(0.37m); //12.GSM CallHistory Test Console.WriteLine("///////////////////"); GSMCallHistoryTest historyTest = new GSMCallHistoryTest(); historyTest.Test(); Console.WriteLine("^^^^^^^^^^^^^^"); GSM nokia = new GSM("htc", "galaxy"); nokia.Call = new Call(DateTime.Now.AddDays(1), "++887 231 123", 32); nokia.CallHistory.Add(myGSM.Call); nokia.Call = new Call(DateTime.Now, "++359 887 231 123", 32); nokia.CallHistory.DisplayHistory(); myGSM.CallHistory.DisplayHistory(); DateTime obj = DateTime.Now; }
static void Main() { GsmTest.test(); GSMCallHistoryTest.testt(); }
public static void Main() { GSMTest.TestingGsmClass(); GSMCallHistoryTest.TestingCallHistory(); }
static void Main() { GSMTest.TestExecutor(); GSMCallHistoryTest.TestExecutor(); }
public static void Main() { GSMTest.TestGSM(); GSMCallHistoryTest.TestCallHistory(); }