Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
 public void DeleteCalls(Call call)
 {
     this.callHistory.Remove(call);
 }
Ejemplo n.º 4
0
 public void AddCalls(Call call)
 {
     this.callHistory.Add(call);
 }
Ejemplo n.º 5
0
 //task10
 public void Adding(Call calling)
 {
     CallHistory.Add(calling);
 }
Ejemplo n.º 6
0
 public void DeleteCall(Call currentCall)
 {
     this.callHistory.Remove(currentCall);
 }
Ejemplo n.º 7
0
 public void AddCall(Call currentCall)
 {
     this.callHistory.Add(currentCall);
 }
Ejemplo n.º 8
0
 public bool DelCall(Call call)
 {
     return CallHistory.Remove(call);
 }
Ejemplo n.º 9
0
 // 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);
 }
Ejemplo n.º 10
0
 // 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);
 }
Ejemplo n.º 11
0
 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);
 }