Example #1
0
File: Main.cs Project: rsmont/OOP
    static void Main(string[] args)
    {
        GSM gsm1 = new GSM("Nokia", "Nokia Corp");

        gsm1.Price = 1300;

        gsm1.Battery.HoursIdle = 120;
        gsm1.Battery.HoursTalk = 12;
        gsm1.TypeOfBattery     = Battery.BatteryType.NiCd;
        gsm1.Battery.Model     = "China";

        gsm1.Display.NumberOfColors = 16;
        gsm1.Display.Size           = 4.5;

        gsm1.Owner = "Pencho";
        Console.WriteLine(gsm1);

        GSM gsm2 = GSM.IPhone4S;

        Console.WriteLine(gsm2);

        GSMTest gsm3 = new GSMTest(5);

        foreach (var item in gsm3)
        {
            Console.WriteLine(item);
        }
    }
Example #2
0
File: Main.cs Project: rsmont/OOP
    static void Main(string[] args)
    {
        GSM gsm1 = new GSM("Nokia", "Nokia Corp");

        gsm1.Price = 1300;

        gsm1.Battery.HoursIdle = 120;
        gsm1.Battery.HoursTalk = 12;
        gsm1.TypeOfBattery = Battery.BatteryType.NiCd;
        gsm1.Battery.Model = "China";

        gsm1.Display.NumberOfColors = 16;
        gsm1.Display.Size = 4.5;

        gsm1.Owner = "Pencho";
        Console.WriteLine(gsm1);

        GSM gsm2 = GSM.IPhone4S;
        Console.WriteLine(gsm2);

        GSMTest gsm3 = new GSMTest(5);
        foreach (var item in gsm3)
        {
            Console.WriteLine(item);
        }
    }
Example #3
0
        public static void Main()
        {
            //Problem 7. GSM test
            GSMTest.GSMTests();

            //Problem 12. Call history test
            GSMCallHistoryTest.TestCallHistory();
        }
Example #4
0
        static void Main()
        {
            // GSMTest -- Display info about 4 GSM-s. (Problem 7)
            GSMTest.DisplayGsmInfo();

            // GSMCallHistoryTest Testing call history (Problem 12)
            GSMCallHistoryTest.TestPhone();
        }
Example #5
0
        static void Main()
        {
            GSMTest.DevicesTest();

            Console.WriteLine(new string ('-', 20));

            GSMCallHistoryTest.TestCallHistory();
        }
        static void Main()
        {
            GSMTest firstTest = new GSMTest();
            firstTest.TestingGSM();

            GSMCallHistoryTest callHistory = new GSMCallHistoryTest();
            callHistory.GSMCallHistoryTesting();
        }
Example #7
0
        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();
        }
Example #8
0
        static void Main()
        {
            GSMTest test = new GSMTest();
            test.Test();

            GSMCallHistoryTest test2 = new GSMCallHistoryTest();
            test2.CallHistoryTest();
        }
Example #9
0
        public static void Main(string[] args)
        {
            var test = new GSMTest();

            test.DisplayGSMInformation();

            var callTest = new GSMCallHistoryTest();

            callTest.CallTest();
        }
Example #10
0
    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();
    }
Example #11
0
        static void Main()
        {
            //Task 7
            var test = new GSMTest();

            test.DisplayInfo();

            //Task 12
            var callHistoryTest = new CallHistoryTest();

            callHistoryTest.TestCallHistory();
        }
    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();
    }
Example #13
0
 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();
 }
Example #14
0
    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();
    }
Example #15
0
        static void Main(string[] args)
        {
            //InitialValue is number of phones you want to create
            GSMTest.InitalValue = 10;
            var phoneGenerator = new GSMTest();

            //creating random phones
            phoneGenerator.GeneratePhonesTest();
            phoneGenerator.PrintPhones();

            var myCalls = new CallHistoryTest();

            //Creating phone with 3 calls in it
            myCalls.TestPhone();
            myCalls.ToString();

            //Removing the Longest Call from the History plus friendly messege
            myCalls.RemoveLongestCall();
            myCalls.ToString();

            //Clear all the calls from the history
            myCalls.ClearHistory();
            myCalls.ToString();
        }
Example #16
0
        static void Main()
        {
            GSMTest.ShowGSMInfo();

            GSMCallHistoryTest.testCallHistory();
        }
Example #17
0
        public static void Main()
        {
            GSMTest.TestingGsmClass();

            GSMCallHistoryTest.TestingCallHistory();
        }
Example #18
0
 private static void Main()
 {
     GSMTest.Run();
     GSMCallHistoryTest.Run();
 }
 static void Main(string[] args)
 {
     GSMTest.TestPrint();
 }
Example #20
0
 static void Main()
 {
     GSMTest.RunTest();
     GSMCallHistoryTest.RunTest();
 }
Example #21
0
 public static void Main()
 {
     GSMTest.TestGSM();
     GSMCallHistoryTest.TestCallHistory();
 }
Example #22
0
 static void Main()
 {
     GSMTest.Test();
     GSMCallHistoryTest.TestCallHistory();
 }
Example #23
0
 static void Main()
 {
     GSMTest.TestExecutor();
     GSMCallHistoryTest.TestExecutor();
 }
Example #24
0
 static void Main()
 {
     GSMTest.DevicesTest();
     CallHistoryTest.CallHistory();
 }