Beispiel #1
0
        static void Main(string[] args)
        {
            RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Steve", "Rogers");

            retailSalesPerson.Sell();

            CarSalesman carSalesman = new CarSalesman("Mike", "Rogers");

            carSalesman.Sell();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Carsalesman carsalesman = new Carsalesman("Marry", "Tom");

            carsalesman.sell();
            RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Harry", "Mat");

            retailSalesPerson.sell();
            WebDeveloper webDeveloper = new WebDeveloper();

            webDeveloper.Develop();
            retailSalesPerson.Develop();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Bruce", "Wayne");

            retailSalesPerson.Sell();

            RetailSalesPerson retailSalesPerson2 = new RetailSalesPerson("Bruce", "Wayne");

            retailSalesPerson2.Sell();

            CarSalesman carSalesman = new CarSalesman("Mike", "Wayne");

            carSalesman.Sell();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            CarSalesman steveTheSalesman = new CarSalesman("Steve", "Rogers");

            Console.WriteLine(steveTheSalesman.FullName);
            steveTheSalesman.Sell();

            /*
             * CarSalesman erikTheSalesdude = new CarSalesman("Erik","Erikson");
             * Console.WriteLine(erikTheSalesdude.FullName);
             * erikTheSalesdude.Sell();
             *
             *
             *
             */

            RetailSalesPerson erikTheSalesdude = new RetailSalesPerson("Erik", "Erikson");

            Console.WriteLine(erikTheSalesdude.FullName);
            erikTheSalesdude.Sell();
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Bruce", "Wayne");

            retailSalesPerson.Sell();
        }
Beispiel #6
0
        static void Main(string[] args)
        {
            List <Salesman> salesman = new List <Salesman> {
                new CarSalesman("James", "Weaver"), new CarSalesman("Felipe", "Brawn"), new RetailSalesPerson("Daphine", "Storm"), new InsuranceBroker("Alex", "Lima"), new OnlineMaraketer("Steve", "Rogers")
            };

            foreach (var item in salesman)
            {
                showmeHowToSell(item);
            }

            List <SellDeveloping> sellDeveloping = new List <SellDeveloping> {
                new RetailSalesPerson("Daphine", "Storm"), new WebDeveloper("C#")
            };

            /*SellDeveloping instead a Object
             *  This can get into it just as simply but if we put self developing interface what this does is it creates
             *  a regulation it creates boundaries around what can get into this list and what can not get into this list.
             */
            foreach (var item in sellDeveloping)
            {
                showMeHowYouSelfDevelop(item);
            }


            HowIGoToWork howIGoToWork = new HowIGoToWork("Alex", "Viera", 7);

            howIGoToWork.WakeUp();

            howIGoToWork.BrushMyTeeth();

            howIGoToWork.Workout();

            howIGoToWork.GetIntoMyCar();

            howIGoToWork.StartDriving();

            Console.WriteLine("Exiting Program :)");



            //Access Public Method
            RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Steve", "Jobs");

            retailSalesPerson.Sell();

            CarSalesman carSalesman = new CarSalesman("Steve", "Lee");

            carSalesman.Sell();


            /*
             *  Just like in the diagram that we saw in the previous video the public axis specifies says that if we
             *  make any method field property etc. public then it can be used from within the class and from the outside
             *  of the class.
             *  So in other words any object has access to it before even going over the other axis specifies.
             *  I want to propose a hypothetical problem.
             *
             *  So another class so a program (main class).
             *  This is a class was able to use cell.
             *  So it was able to access cell from its own method which
             *  is Main and the Main is just kind of like the entry point into the whole application.
             */
        }