public static void Main() { var tests = new GsmTests(); tests.DisplayGsmInformation(); var call = new Call(new DateTime(2015, 09, 15, 12, 54, 6), "0456-345-33", 390); Console.WriteLine(call.ToString()); var callTest = new GsmCallHistoryTest(); callTest.Functionality(); }
static void Main(string[] args) { List<MobilePhone> mobilePhones = new List<MobilePhone>(); mobilePhones.Add(new MobilePhone("1020C", "Nokia", 1299.99m, "Jhon Dow", new Battery("2307", 15, 5, BatteryType.LiIon), new Display(new DisplaySize(1980, 1024), 65000000))); mobilePhones.Add(new MobilePhone("Galaxy NOTE", "Samsung")); mobilePhones.Add(new MobilePhone("AishE", "Nokia", 299.90m, battery: new Battery())); mobilePhones.Add(new MobilePhone("1020C", "Nokia", 1299.99m, display: new Display(new DisplaySize(1980, 1024), 65000000))); foreach (var phone in mobilePhones) { Console.WriteLine(phone); } Console.WriteLine(mobilePhones[0].IPhone4SInfo); Console.WriteLine(mobilePhones[1].IPhone4SInfo); Call call = new Call(DateTime.Now, DateTime.Now.AddSeconds(177), "Pesho"); CallHistoryTest.Test(); }
public void DeleteCalls(Call call) { this.callHistory.Remove(call); }
public void AddCalls(Call call) { this.callHistory.Add(call); }
//task10 public void Adding(Call calling) { CallHistory.Add(calling); }
public void DeleteCall(Call currentCall) { this.callHistory.Remove(currentCall); }
public void AddCall(Call currentCall) { this.callHistory.Add(currentCall); }
public bool DelCall(Call call) { return CallHistory.Remove(call); }
// 10. Add methods in the GSM class for adding and deleting calls // from the calls history. Add a method to clear the call history. public void AddCall(Call call) { CallHistory.Add(call); }
// Methods that handle calls in the call history - Add/Remove(via duration ^ number), Clear public void AddCallToHistory(string number, int duration) { Call newCall = new Call(DateTime.Now,number,duration); callHistory.Add(newCall); }
public void AddCall(DateTime date, TimeSpan time, int number, int duration) { Call call = new Call(date, time, number, duration); this.callHistory.Add(call); }
public void AddCall(string number, int duration) { Call newCall = new Call(number, duration); this.callHistory.Add(newCall); }