Beispiel #1
0
        static void Main(string[] args)
        {
            Student obj = new Student(1, "sdsd", "2/23/2016", "pune");

            Console.WriteLine("Details " + obj.getDetails());
            Console.WriteLine("Age " + obj.getAge());

            Employee obj1 = new Employee(1, "abc", 1200.5, "12/20/2018");

            Console.WriteLine("Salary " + obj1.getSalary(42));
            Console.WriteLine("Experiance " + obj1.getExperiance());

            Product obj2 = new Product();

            Console.WriteLine(obj2.getProduct());

            Book obj3 = new Book(2, "Harry Potter", 200, "J K ROwling");

            Console.WriteLine(obj3.getDetails());

            Console.ReadKey();
            Environment.Exit(1);
        }
        static void Main(string[] args)
        {
            Employee e = new Employee(300, "nguyen", "minh", 1500000);

            Console.WriteLine(e.toString());
            e.setSalary(3000000);
            Console.WriteLine("id " + e.getID() + " firstName " + e.getFirstName() + " lastName " + e.getLastName() + " salary " + e.getSalary());
            Console.WriteLine(e.toString());
            Console.WriteLine(e.getAnnualSalary());
            Console.WriteLine(e.raiseSalary(10 / 100));
        }