예제 #1
0
        static void Main(string[] args)
        {
            // WE CAN'T CREATE A NEW INSTANCE OF AN ABSTRACT CLASS OR INTERFACE
            // Human bob1 = new Human("Bob", 28, 38970707070);
            // IHuman bob2 = new IHuman();

            Developer dev = new Developer("Bob Bobsky", 44, 38970070070,
                                          new List <string>()
            {
                "JavaScript", "C#", "HTML", "CSS"
            }, 6);
            Tester     tester = new Tester("Jill Wayne", 32, 38971071071, 560);
            Operations ops    = new Operations("Greg Gregsky", 28, 38975075075,
                                               new List <string>()
            {
                "Optimus", "ProtoBeat", "PickPro"
            });
            DevOps     devOps = new DevOps("Anne Brown", 24, 38977070070, true, false);
            QAEngineer qa     = new QAEngineer("Mia Wong", 34, 38972072072,
                                               new List <string>()
            {
                "Selenium"
            });

            Console.WriteLine("WELCOME TO THE COMPANY APP");
            Console.WriteLine("--------------------------");
            Console.WriteLine("Developer:");
            Console.WriteLine(dev.GetInfo());
            dev.Greet("Students");
            dev.Code();
            Console.WriteLine("--------------------------");
            Console.WriteLine("Tester:");
            Console.WriteLine(tester.GetInfo());
            tester.Greet("Students");
            tester.TestFeature("Log in");
            Console.WriteLine("--------------------------");
            Console.WriteLine("IT Operations:");
            Console.WriteLine(ops.GetInfo());
            ops.Greet("Students");
            Console.WriteLine($"Infrastructure OK: {ops.CheckInfrastructure(200)}");
            Console.WriteLine("--------------------------");
            Console.WriteLine("QA Engineer:");
            Console.WriteLine(qa.GetInfo());
            qa.Greet("Students");
            qa.TestFeature("Log out");
            qa.Code();
            Console.WriteLine("--------------------------");
            Console.WriteLine("Dev Ops:");
            Console.WriteLine(devOps.GetInfo());
            devOps.Greet("Students");
            Console.WriteLine($"Infrastructure OK: {devOps.CheckInfrastructure(404)}");
            devOps.Code();



            Console.ReadLine();
        }
예제 #2
0
 static void Main(string[] args)
 {
     // Can't create an instance of an abstract class
     // Human person = new Human();
     #region Instances
     Developer dev = new Developer("Bob Bobsky", 44, 38970070070,
                                   new List <string>()
     {
         "JavaScript", "C#", "HTML", "CSS"
     }, 6);
     Tester     tester = new Tester("Jill Wayne", 32, 38971071071, 560);
     Operations ops    = new Operations("Greg Gregsky", 28, 38975075075,
                                        new List <string>()
     {
         "Optimus", "ProtoBeat", "PickPro"
     });
     DevOps     devOps = new DevOps("Anne Brown", 24, 38977070070, true, false);
     QAEngineer qa     = new QAEngineer("Mia Wong", 34, 38972072072,
                                        new List <string>()
     {
         "Selenium"
     });
     #endregion
     #region Testing all methods
     Console.WriteLine("The Developer:");
     Console.WriteLine(dev.GetInfo());
     dev.Greet("Students");
     dev.Code();
     Console.WriteLine("----------------");
     Console.WriteLine("The Tester:");
     Console.WriteLine(tester.GetInfo());
     tester.Greet("Students");
     tester.TestFeature("Log In");
     Console.WriteLine("----------------");
     Console.WriteLine("The IT Operations Specialist:");
     Console.WriteLine(ops.GetInfo());
     ops.Greet("Students");
     Console.WriteLine($"Infrastructure OK: {ops.CheckInfrastructure(200)}");
     Console.WriteLine("----------------");
     Console.WriteLine("The DevOps:");
     Console.WriteLine(devOps.GetInfo());
     devOps.Greet("Students");
     devOps.Code();
     Console.WriteLine($"Infrastructure OK: {ops.CheckInfrastructure(200)}");
     Console.WriteLine("----------------");
     Console.WriteLine("The QA Engineer:");
     Console.WriteLine(qa.GetInfo());
     qa.Greet("Students");
     qa.Code();
     qa.TestFeature("Order");
     Console.WriteLine("----------------");
     Console.ReadLine();
     #endregion
 }
예제 #3
0
        static void Main(string[] args)
        {
            // you cannot instantiate an object from an abstract class
            //Human myFavHuman = new Human();

            #region Instances
            Developer dev = new Developer("Bob Bobsky", 25, 38970111222, 3, new List <string>()
            {
                "C#", "PhP", "HTML"
            });
            Tester     tester = new Tester("John Snow", 22, 38977123123, 120);
            DevOps     devOps = new DevOps("Roki Balboa", 35, 38978321321, true, false);
            QAEngineer qa     = new QAEngineer("Fidancho FIdanovski", 43, 38975123123, 1876, new List <string>()
            {
                "Chai", "Selenium"
            });
            #endregion


            #region Testing methods
            Console.WriteLine("The Developer");
            Console.WriteLine(dev.GetInfo());
            dev.Greet("Marija");
            dev.Code();
            Console.WriteLine("------------------------------");

            Console.WriteLine("The Tester");
            Console.WriteLine(tester.GetInfo());
            tester.Greet("Sanja");
            tester.TestFeature("Sending transaction to Blockchain");
            Console.WriteLine("------------------------------");

            Console.WriteLine("The DevOps");
            Console.WriteLine(devOps.GetInfo());
            devOps.Greet("Pane");
            devOps.CheckInfrastructure(404);
            devOps.Code();
            Console.WriteLine("------------------------------");

            Console.WriteLine("The QA");
            Console.WriteLine(qa.GetInfo());
            qa.Greet("Kiki");
            qa.TestFeature("Buy item from products");
            Console.WriteLine("------------------------------");
            #endregion
            Console.ReadLine();
        }
예제 #4
0
        static void Main(string[] args)
        {
            //Person person = new Person("Martin", "Stojanovski", 20, 3647474); - ERROR - abstract class, can not instantiate

            Developer  developer         = new Developer("Ivana", "Petrevska", 24, 5345435, "ECommerce", 2);
            DevOps     devOps            = new DevOps("MArko", "Markovski", 30, 767467324, true, false);
            Operations operationsManager = new Operations("Vasil", "Markovski", 28, 767467324,
                                                          new List <string> {
                "BetProject", "DentalSystem"
            });
            QAEngineer qA = new QAEngineer("Ana", "Martinovska", 34, 453454, null);

            Console.WriteLine("Dev:");
            Console.WriteLine(developer.GetInfo());
            Console.WriteLine("DevOps:");
            Console.WriteLine(devOps.GetInfo());
            Console.WriteLine("Ops:");
            Console.WriteLine(operationsManager.GetInfo());
            Console.WriteLine("QA:");
            Console.WriteLine(qA.GetInfo());

            Console.WriteLine("Dev:");
            //from Person
            developer.Goodbye();
            //from IDeveloper
            developer.Code();

            Console.WriteLine("DevOps:");
            //from Person
            devOps.Greet("SEDC");
            //from Person
            devOps.Goodbye();
            //from IDeveloper
            devOps.Code();
            //from IOperations
            Console.WriteLine(devOps.CheckInfrastructure(200));

            HappyBirthday(developer);
            HappyBirthday(qA);

            Console.ReadLine();
        }