예제 #1
0
        static void Main(string[] args)
        {
            GeneralManager g = new GeneralManager("value", "cleark", "onkar", 30000, 1);

            Console.WriteLine(g.CalcNetSalary());
            Employee e = new CEO("vedant", 32000.5m, 2);

            Console.WriteLine(e.CalcNetSalary());
        }
예제 #2
0
파일: Program.cs 프로젝트: Ashut00sh/Ms.Net
        static void Main(string[] args)
        {
            Employee e1 = new Manager("Ashutosh", 4, "Developer", 12000);
            Employee e2 = new GeneralManager("hari", 5, 50000, "CEO");
            Employee e3 = new CEO("ram", 6, 1100000);

            Console.WriteLine(e1.CalCNetSalary());
            Console.WriteLine(e2.CalCNetSalary());
            Console.WriteLine(e3.CalCNetSalary());
            //method 1
            e1.open();
            e1.close();
            //method 2
            IDBfunction Idbf;

            Idbf = e2;
            Idbf.open();
            Idbf.close();
            //method 3
            ((IDBfunction)e3).open();
            ((IDBfunction)e3).close();

            Console.ReadLine();
        }