static void Main(string[] args) { GSMTest test = new GSMTest(); string testResult = test.displayInformation(); Console.WriteLine(testResult); //Console.WriteLine(GSM.IPhone4S); //Console.WriteLine("**********************"); //GSM tester = new GSM(); //Call newCall = new Call("08.08.2012", "18:00", "0886254882", 600); //Console.WriteLine(newCall); //Call newCaller = new Call("10.02.2012", "17:00", "0886254882", 600); //Call newCaller2 = new Call("11.12.2012", "17:00", "0886254882", 600); //Call newCaller3 = new Call("08.08.2012", "18:00", "0886254882", 600); //tester.AddCall(newCaller); //tester.AddCall(newCaller2); //tester.AddCall(newCaller3); ////tester.RemoveCall(1); ////tester.EmptyCallHistory(); //decimal price = tester.CalculatePrice(1.0m); //Console.WriteLine("{0:F2}лв.", price); GSMCallHistoryTest testCall = new GSMCallHistoryTest(); testCall.Test(); }
static void Main(string[] args) { //var model = Console.ReadLine(); //var manufacturer = Console.ReadLine(); //var price = decimal.Parse(Console.ReadLine()); //var owner = Console.ReadLine(); //GSM myGSM = new GSM(model, manufacturer, price, owner); //myGSM.MyBattery.Model = Console.ReadLine(); //BatteryType type; //string inputType = Console.ReadLine(); //var parsedType = Enum.TryParse(inputType, out type); //myGSM.MyBattery.Type = type; //Console.WriteLine(myGSM); GSMTest currTest = new GSMTest(); Console.WriteLine(currTest.ToString()); var model = Console.ReadLine(); var manu = Console.ReadLine(); GSM currGSM = new GSM(model, manu); currGSM.AddCall() }
public static void Main() { GSMTest test = new GSMTest(); test.DisplayInfo(); GSMCallHistoryTest testCalls = new GSMCallHistoryTest(); testCalls.TestCalls(); }
static void Main(string[] args) { GSMTest.CreateGSMs(); GSMTest.DisplayContent(); Console.ReadLine(); }
static void Main(string[] args) { //run GSMTest class GSMTest.StartGSMTest(); //run GSMCallHIstoryTest class GSMCallHistoryTest.StartGSMCallHistoryTest(); }
public static void Main() { //test the GSMClass (ex 1 - 7) GSMTest.Test(); Console.WriteLine("\nGSM CallManager Test:\n"); //Test the GSMCallHistory (ex 8 -12) GSMCallHistoryTest.Test(); }
static void Main() { Console.WriteLine("GSM Test:"); GSMTest testGSM = new GSMTest(); testGSM.Test(); Console.WriteLine(); Console.WriteLine("GSM Call history test: "); CallHistoryTest testCallHistory = new CallHistoryTest(); testCallHistory.Test(); }
static void Main() { var gsmTest = new GSMTest(); gsmTest.DisplayGsmInformation(); var callTest = new GSMCallHistoryTest(); callTest.Test(); }
public static void Main() { try { Display display = new Display(4, 16000000); Battery battery = new Battery(620, 8, Battery.BatteryModel.NiMH); GSM phone = new GSM("One", "HTC", 850, "Person", battery, display); GSMTest test = new GSMTest(); Console.WriteLine("============="); test.GSMTesting(); Console.WriteLine("============="); DateTime time = new DateTime(); time = DateTime.Now; Calls[] call = new Calls[5]; //making some phone calls for (int i = 0; i < 5; i++) { time = time.AddDays(i); string phoneNumber = "0888999999"; int duration = i + 100; call[i] = new Calls(time, phoneNumber, duration); phone.AddCall(call[i]); } Console.WriteLine(); decimal pricePerMinute = 0.37m; //display call information phone.CallHistory(); Console.WriteLine("============="); phone.TotalPriceOfCalls(pricePerMinute); Console.WriteLine("============="); phone.FindLongestCall(); phone.TotalPriceOfCalls(pricePerMinute); Console.WriteLine("============="); phone.ClearCallHistory(); phone.CallHistory(); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
static void Main() { Console.WriteLine(new string('-', 79)); Console.WriteLine("GSM tests: "); Console.WriteLine(new string('-', 79)); GSM[] phones = GSMTest.GeneratePhones(); for (int i = 0; i < phones.Length; i++) { Console.WriteLine(phones[i].ToString()); } Console.WriteLine(new string('-', 79)); Console.WriteLine("Call history tests: "); Console.WriteLine(new string('-', 79)); Console.WriteLine("Phone: {0} \n", phones[1].Model); GSMCallHistoryTest.GenerateCallHistory(phones[1]); Console.WriteLine("Initial call history: \n"); GSMCallHistoryTest.PrintHistory(phones[1]); Console.WriteLine(); Console.WriteLine("Total call prices: {0}", phones[1].CalculateTotalCallsPrices(0.37f)); // Remove the longest duration int max = phones[1].CallHistory.Max(x => x.Duration); phones[1].CallHistory = phones[1].CallHistory.Where(x => x.Duration != max).ToList(); Console.WriteLine(); Console.WriteLine("New call history: \n"); // Print after removal GSMCallHistoryTest.PrintHistory(phones[1]); Console.WriteLine(); Console.WriteLine("Total call prices (after longest call removal): {0}", phones[1].CalculateTotalCallsPrices(0.37f)); phones[1].ClearCallHistory(); // Print after erasing Console.WriteLine(); Console.WriteLine("Call history after clearing: "); GSMCallHistoryTest.PrintHistory(phones[1]); }
static void Main(string[] args) { GSM gsm = new GSM("", "", "", 3, new Display(5, "b/w"), new Battery(), new List <Call>()); Battery battery = new Battery("NK5-P", 72, 16); Display display = new Display(4.7, "16M"); //Print the GSM Console.WriteLine("\nGSM\n" + new string('-', 40)); Console.WriteLine(gsm.ToString()); //Print the static property IPhone4S Console.WriteLine("\niPhone static property\n" + new string('-', 40)); Console.WriteLine(GSM.IPhone4S.ToString()); Console.WriteLine("\nCreate list of phones\n" + new string('-', 40)); GSMTest.CreateListOfPhones(); Console.WriteLine("\nTest Call history\n" + new string('-', 40)); GSMCallHistoryTest.CreateCallHistory(); }
static void Main() { GSMTest.TestGSMClass(); GSMCallHistoryTest.TestGSMCallHistory(); }
public static void Main() { GSMTest.PrintPhones(); // Problem 7 GSMCallHistoryTest.CallsHistoryTest(); // Problem 12 }
private static void Main() { GSMTest.TestGsm(); }
private static void Main() { GSMTest.PrintIPhone4S(); GSMTest.PrintHandysInformation(); GSMCallHistoryTest.CallHistorySimulation(); }