static void Main()
        {
            Console.WriteLine("manager");
            Manager m1 = new Manager("akshay", 700000, 1, "HR");

            Console.WriteLine("name " + m1.NAME);
            Console.WriteLine("net salary == " + m1.CalNetSalary());
            Console.WriteLine("===========================================");
            Console.WriteLine("general manager");
            GeneralManager gm1 = new GeneralManager("mahesh", 500000, 1, "GM", "abccc");

            Console.WriteLine("name " + gm1.NAME);
            Console.WriteLine("net salary == " + gm1.CalNetSalary());
            Console.WriteLine("===========================================");
            Console.WriteLine("CEO");
            CEO c1 = new CEO("akash", 800000, 4);

            Console.WriteLine("name " + c1.NAME);
            Console.WriteLine("net salary == " + c1.CalNetSalary());



            Console.WriteLine("=============================================");
            IDbFunctions i1 = new Manager();

            i1.Delete();
            i1.Update();
            i1.Insert();

            Console.WriteLine("===========================================");
            IDbFunctions i2 = new GeneralManager();

            i2.Insert();
            i2.Update();
            i2.Delete();

            Console.WriteLine("==========================================");
            IDbFunctions i3 = new CEO();

            i3.Delete();
            i3.Update();
            i3.Insert();

            Console.WriteLine("==========================================");
            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Manager");
            Manager mg = new Manager("Hello", "Amol", 11, 17000000);

            Console.WriteLine(mg.Name + "   " + mg.BasicSal);
            Console.WriteLine("Net sal : " + mg.calcNetSalary());


            Console.WriteLine("----------------------------------------");
            Console.WriteLine("General Manager");
            GeneralManager gmg = new GeneralManager("Hello", "Hello", "Amol", 12, 16000000);

            Console.WriteLine(gmg.Name + "   " + gmg.BasicSal);
            Console.WriteLine("Net sal : " + gmg.calcNetSalary());

            Console.WriteLine("----------------------------------------");
            Console.WriteLine("CEO");
            CEO c = new CEO("Amol", 13, 20000000);

            Console.WriteLine(c.Name + "   " + c.BasicSal);
            Console.WriteLine("Net sal : " + c.calcNetSalary());


            Console.WriteLine("----------------------------------------");
            IDbFunctions i1 = new Manager();

            i1.Delete();
            i1.Update();

            Console.WriteLine("----------------------------------------");
            IDbFunctions i2 = new GeneralManager();

            i2.Insert();

            Console.WriteLine("----------------------------------------");
            IDbFunctions i3 = new CEO();

            i3.Delete();
            i3.Update();

            Console.ReadLine();
        }