static void Main(string[] args) { RetailSalesPerson retailSalesPerson = new RetailSalesPerson("Steve", "Rogers"); retailSalesPerson.Sell(); CarSalesman carSalesman = new CarSalesman("Mike", "Rogers"); carSalesman.Sell(); }
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(); }
private static void Main(string[] args) { CarSalesman nirajTheCarDude = new CarSalesman("Niraj", "Dahal"); Console.WriteLine(nirajTheCarDude.FullName); nirajTheCarDude.Sell(); RetailSalesMan himansuTheRetailMan = new RetailSalesMan("Himansu", "Poudel"); Console.WriteLine(himansuTheRetailMan.FullName); himansuTheRetailMan.Sell(); himansuTheRetailMan.Develop(); WebDeveloper dahalTheWebDeveloper = new WebDeveloper("C#"); dahalTheWebDeveloper.Code(); dahalTheWebDeveloper.Code("Javascript", "Typescript"); dahalTheWebDeveloper.Develop(); DatabaseDeveloper ryanTheDatabaseDeveloper = new DatabaseDeveloper("SQL"); ryanTheDatabaseDeveloper.Code(); ryanTheDatabaseDeveloper.Code("Java"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine("*******************************"); Console.WriteLine(""); Console.WriteLine(""); List <Salesman> salesmen = new List <Salesman>() { new CarSalesman("Rajib", "Bhandari"), new CarSalesman("Sahadev", "Bhandari"), new RetailSalesMan("Puran", "Dahal"), new RetailSalesMan("Pujan", "Boss") }; foreach (var salesman in salesmen) { SalesHelper.HowISell(salesman); } }
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(); }
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. */ }