예제 #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
        static void Main()
        {
            Employee emp = new Manager("Sandy", 10, 18000, "GM");

            Console.WriteLine(emp.EMPNO + " " + emp.NAME + " " + emp.DEPTNO + " " + emp.BASIC);
            Console.ReadLine();

            Manager emp1 = new Manager("San", 10, 18000, "GM");

            Console.WriteLine(emp1.EMPNO + " " + emp1.NAME + " " + emp1.DEPTNO + " " + emp1.BASIC + " " + emp1.DESIGNATION);
            Console.ReadLine();

            GeneralManager emp2 = new GeneralManager("Sidd", 10, 18000, "GM", "Allowed");

            Console.WriteLine(emp2.EMPNO + " " + emp2.NAME + " " + emp2.DEPTNO + " " + emp2.BASIC + " " + emp2.DESIGNATION + " " + emp2.PERKS);
            Console.ReadLine();

            Employee emp3 = new CEO("Sanjit", 10);

            Console.WriteLine(emp3.EMPNO + " " + emp3.NAME + " " + emp3.DEPTNO + " " + emp3.BASIC);
            Console.ReadLine();
        }
예제 #3
0
        static void Main(string[] args)
        {
            string name, desg;

            Console.WriteLine("Enter Name ");
            name = Console.ReadLine();
            short deptno;

            Console.WriteLine("Enter DeptNo ");
            deptno = short.Parse(Console.ReadLine());

            decimal sal;

            Console.WriteLine("Enter Salary ");
            sal = decimal.Parse(Console.ReadLine());

            Console.WriteLine("Enter Desgination");
            desg = Console.ReadLine();


            Manager m1 = new Manager(name, deptno, sal, desg);

            m1.show();
            Console.WriteLine(m1.CalcNetSalary());

            GeneralManager gm1 = new GeneralManager("Janvi", 30, 40000, "Delhi", "Accomdation");

            gm1.show();
            Console.WriteLine(gm1.CalcNetSalary());


            Ceo c1 = new Ceo("Amrita", 10, 10000);

            c1.show();
            Console.WriteLine(c1.CalcNetSalary());

            Console.ReadLine();
        }